https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67106
Bug ID: 67106 Summary: [6 Regression] ICE: verify_type failed: type variant differs by TYPE_PACKED. with -g -fpack-struct Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Created attachment 36114 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36114&action=edit reduced testcase Compiler output: $ /mnt/svn/gcc-trunk/binary-latest/bin/gcc -g -fpack-struct testcase.c testcase.c:8:3: error: type variant differs by TYPE_PACKED. }; ^ <record_type 0x7fdaa76b7f18 S packed type_0 VOID align 8 symtab -1486058768 alias set -1 canonical type 0x7fdaa76b7f18 pointer_to_this <pointer_type 0x7fdaa76da348> chain <type_decl 0x7fdaa75ccd10 D.1755>> <record_type 0x7fdaa76da000 S VOID align 8 symtab -1486058848 alias set -1 canonical type 0x7fdaa76b7f18 pointer_to_this <pointer_type 0x7fdaa76da2a0> chain <type_decl 0x7fdaa75ccd10 D.1755>> testcase.c:8:3: internal compiler error: verify_type failed 0xeb4379 verify_type(tree_node const*) /mnt/svn/gcc-trunk/gcc/tree.c:13570 0x7c3d34 gen_type_die_with_usage /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20685 0x7c44c5 gen_type_die_with_usage /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20783 0x7c5516 gen_type_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20879 0x7d354d gen_decl_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:21519 0x7c2fcd gen_member_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20356 0x7c2fcd gen_struct_or_union_type_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20461 0x7c2fcd gen_tagged_type_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20662 0x7c483d gen_type_die_with_usage /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20824 0x7c5516 gen_type_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:20879 0x7d3a79 gen_decl_die /mnt/svn/gcc-trunk/gcc/dwarf2out.c:21465 0x7d4594 dwarf2out_decl /mnt/svn/gcc-trunk/gcc/dwarf2out.c:21915 0x7d486b dwarf2out_type_decl /mnt/svn/gcc-trunk/gcc/dwarf2out.c:21625 0xb187ef rest_of_type_compilation(tree_node*, int) /mnt/svn/gcc-trunk/gcc/passes.c:336 0x5d4cf3 finish_struct(unsigned int, tree_node*, tree_node*, tree_node*, c_struct_parse_info*) /mnt/svn/gcc-trunk/gcc/c/c-decl.c:7849 0x611a4e c_parser_struct_or_union_specifier /mnt/svn/gcc-trunk/gcc/c/c-parser.c:2812 0x611a4e c_parser_declspecs /mnt/svn/gcc-trunk/gcc/c/c-parser.c:2387 0x60fc2b c_parser_struct_declaration /mnt/svn/gcc-trunk/gcc/c/c-parser.c:2896 0x6119b7 c_parser_struct_or_union_specifier /mnt/svn/gcc-trunk/gcc/c/c-parser.c:2786 0x6119b7 c_parser_declspecs /mnt/svn/gcc-trunk/gcc/c/c-parser.c:2387 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. $ /mnt/svn/gcc-trunk/binary-latest/bin/gcc -v Using built-in specs. COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-226486-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df --enable-languages=c,c++,lto,fortran --prefix=/mnt/svn/gcc-trunk/binary-226486-lto-fortran-checking-yes-rtl-df/ --without-cloog --without-ppl --without-isl Thread model: posix gcc version 6.0.0 20150803 (experimental) (GCC) -freport-bug fails here: $ /mnt/svn/gcc-trunk/binary-latest/bin/gcc -freport-bug -g -fpack-struct testcase.c testcase.c:8:3: error: type variant differs by TYPE_PACKED. }; ... 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. The bug is not reproducible, so it is likely a hardware or OS problem. Is this behavior expected? It reproduces everytime for me. Tested revisions: r226486 - ICE gcc-5-branch r225803 - OK