https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66325
Bug ID: 66325 Summary: ICE in gcc.c-torture/execute/930408-1.c, verify_type fails with --enable-checking=yes Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ktkachov at gcc dot gnu.org CC: hubicka at gcc dot gnu.org Target Milestone: --- Target: arm-none-eabi I'm getting this ICEs in the arm testsuite: FAIL: gcc.c-torture/execute/930408-1.c -O3 -g (internal compiler error) FAIL: gcc.c-torture/execute/930408-1.c -O3 -g (test for excess errors) FAIL: gcc.c-torture/execute/930408-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error) FAIL: gcc.c-torture/execute/930408-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) FAIL: gcc.c-torture/execute/930408-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error) FAIL: gcc.c-torture/execute/930408-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for excess errors) The ICE backtrace is: 930408-1.c:6:1: error: type variant differs by TYPE_PACKED. } s; ^ <enumeral_type 0x7f7dbda115e8 foo asm_written unsigned packed type_0 QI size <integer_cst 0x7f7dbdba4000 type <integer_type 0x7f7dbdb95150 bitsizetype> constant 8> unit size <integer_cst 0x7f7dbdba4018 type <integer_type 0x7f7dbdb950a8 sizetype> constant 1> align 8 symtab -1113450304 alias set -1 canonical type 0x7f7dbda115e8 precision 8 min <integer_cst 0x7f7dbdba4030 0> max <integer_cst 0x7f7dbdb91fc0 255> values <tree_list 0x7f7dbdc7ee60 value <integer_cst 0x7f7dbdba42d0 constant 0> chain <tree_list 0x7f7dbdc7ee88 purpose <identifier_node 0x7f7dbda21960 e1 symbol <const_decl 0x7f7dbda2f070 e1>> value <integer_cst 0x7f7dbdba42e8 constant 1>>> chain <type_decl 0x7f7dbdbb2980 D.4163>> <enumeral_type 0x7f7dbda11690 E unsigned QI size <integer_cst 0x7f7dbdba4000 type <integer_type 0x7f7dbdb95150 bitsizetype> constant 8> unit size <integer_cst 0x7f7dbdba4018 type <integer_type 0x7f7dbdb950a8 sizetype> constant 1> align 8 symtab -1113450384 alias set -1 canonical type 0x7f7dbda115e8 precision 8 min <integer_cst 0x7f7dbdba4030 0> max <integer_cst 0x7f7dbdb91fc0 255> values <tree_list 0x7f7dbdc7ee60 purpose <identifier_node 0x7f7dbda21910 e0 symbol <const_decl 0x7f7dbda2f000 e0>> value <integer_cst 0x7f7dbdba42d0 constant 0> chain <tree_list 0x7f7dbdc7ee88 purpose <identifier_node 0x7f7dbda21960 e1 symbol <const_decl 0x7f7dbda2f070 e1>> value <integer_cst 0x7f7dbdba42e8 constant 1>>> chain <type_decl 0x7f7dbdbb2980 D.4163>> 930408-1.c:6:1: internal compiler error: verify_type failed 0xd47e13 verify_type(tree_node const*) $TOP/gcc/tree.c:13276 0x723fbc gen_type_die_with_usage $TOP/gcc/dwarf2out.c:20250 0x725079 gen_type_die $TOP/gcc/dwarf2out.c:20434 0x7383cc gen_decl_die $TOP/gcc/dwarf2out.c:21041 0x736545 gen_member_die $TOP/gcc/dwarf2out.c:19945 0x736545 gen_struct_or_union_type_die $TOP/gcc/dwarf2out.c:20038 0x736545 gen_tagged_type_die $TOP/gcc/dwarf2out.c:20227 0x724c88 gen_type_die_with_usage $TOP/gcc/dwarf2out.c:20381 0x725079 gen_type_die $TOP/gcc/dwarf2out.c:20434 0x737c80 gen_decl_die $TOP/gcc/dwarf2out.c:20987 0x738f4b dwarf2out_decl $TOP/gcc/dwarf2out.c:21397 0x73a161 dwarf2out_type_decl $TOP/gcc/dwarf2out.c:21096 0x9ce063 rest_of_type_compilation(tree_node*, int) $TOP/gcc/passes.c:309 0x55312f finish_struct(unsigned int, tree_node*, tree_node*, tree_node*, c_struct_parse_info*) $TOP/gcc/c/c-decl.c:7850 0x59b443 c_parser_struct_or_union_specifier $TOP/gcc/c/c-parser.c:2829 0x59b443 c_parser_declspecs $TOP/gcc/c/c-parser.c:2403 0x5a39e0 c_parser_declaration_or_fndef $TOP/gcc/c/c-parser.c:1571 0x5ab4fe c_parser_external_declaration $TOP/gcc/c/c-parser.c:1452 0x5ab797 c_parser_translation_unit $TOP/gcc/c/c-parser.c:1339 0x5ab797 c_parse_file() $TOP/gcc/c/c-parser.c:15457 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. I see this at least as far back as r223695 and it appears on trunk at r223800. Honza, is this related to your type work recently? My arm-none-eabi compiler is configured with: --enable-checking=yes --with-newlib --with-fpu=neon-fp-armv8 --with-arch=armv8-a --without-isl