https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88222
Bug ID: 88222 Summary: ubsan error at cp/decl.c for broken code Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this broken C++ code: typedef char a[]; class S { a : 4; }; recent gcc built with ubsan does this: ../../trunk/gcc/cp/decl.c:12225:26: runtime error: member access within null pointer of type 'const struct cp_declarator' bug483.cc:4:6: internal compiler error: Segmentation fault 4 | a : 4; | ^ 0x276a29f crash_signal ../../trunk/gcc/toplev.c:326 0xa777c5 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../trunk/gcc/cp/decl.c:12225 Also: /home/dcb/gcc/results.265631.ubsan/bin/gcc bug483.cc:4:6: error: bit-field ‘<anonymous>’ with non-integral type /home/dcb/gcc/results.265683.asan/bin/gcc bug483.cc:4:6: internal compiler error: Segmentation fault So the problem seems to occur sometime between revisions 265631 and 265683.