https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72816
Bug ID: 72816 Summary: ICE on x86_64-linux-gnu (tree check: expected tree that contains ‘decl with RTL’ structure, have ‘field_decl’ in set_decl_rtl, at emit-rtl.c:1282) Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chengniansun at gmail dot com Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap Thread model: posix gcc version 7.0.0 20160805 (experimental) [trunk revision 239162] (GCC) $ gcc-trunk small.c small.c:4:5: error: array size missing in ‘a’ A a; ^ small.c:4:3: internal compiler error: tree check: expected tree that contains ‘decl with RTL’ structure, have ‘field_decl’ in set_decl_rtl, at emit-rtl.c:1282 A a; ^ 0xe56494 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc-source-trunk/gcc/tree.c:9914 0x88c8fc contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc-source-trunk/gcc/tree.h:3137 0x88c8fc set_decl_rtl(tree_node*, rtx_def*) ../../gcc-source-trunk/gcc/emit-rtl.c:1282 0xbbbbac relayout_decl(tree_node*) ../../gcc-source-trunk/gcc/stor-layout.c:781 0x66fa45 finish_decl(tree_node*, unsigned int, tree_node*, tree_node*, tree_node*) ../../gcc-source-trunk/gcc/c/c-decl.c:4920 0x677117 grokfield(unsigned int, c_declarator*, c_declspecs*, tree_node*, tree_node**) ../../gcc-source-trunk/gcc/c/c-decl.c:7522 0x6cc785 c_parser_struct_declaration ../../gcc-source-trunk/gcc/c/c-parser.c:3177 0x6ce3c9 c_parser_struct_or_union_specifier ../../gcc-source-trunk/gcc/c/c-parser.c:2982 0x6ce3c9 c_parser_declspecs ../../gcc-source-trunk/gcc/c/c-parser.c:2574 0x6d1920 c_parser_declaration_or_fndef ../../gcc-source-trunk/gcc/c/c-parser.c:1731 0x6de70d c_parser_external_declaration ../../gcc-source-trunk/gcc/c/c-parser.c:1567 0x6defe9 c_parser_translation_unit ../../gcc-source-trunk/gcc/c/c-parser.c:1448 0x6defe9 c_parse_file() ../../gcc-source-trunk/gcc/c/c-parser.c:18047 0x741d82 c_common_parse_file() ../../gcc-source-trunk/gcc/c-family/c-opts.c:1070 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. $ cat small.c typedef const int A[]; struct { int add_offset; A a; }; $