https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66181
Bug ID: 66181 Summary: [6 Regression]: /usr/include/bits/types.h:134:16: ICE: verify_type failed Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- Recent commits caused following ICE, reproducible with to-be attached source and a crosscompiler from x86_64-linux-gnu to alpha-linux-gnu: $ /ssd/uros/gcc-build-alpha/gcc/cc1plus -O2 -g -std=gnu++0x -fpreprocessed -o xxx.s stdc++.ii In file included from /usr/include/ctype.h:26:0, from /space/homedirs/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/cctype:42, from /space/homedirs/uros/gcc-svn/trunk/libstdc++-v3/include/precompiled/stdc++.h:35: /usr/include/bits/types.h:134:16: error: type variant differs by TYPE_NO_FORCE_BLK. __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */ ^ <record_type 0x7fd1cb443348 ._0 asm_written no-force-blk type_5 BLK size <integer_cst 0x7fd1cb24cb28 type <integer_type 0x7fd1cb250150 bitsizetype> constant 64> unit size <integer_cst 0x7fd1cb24cb40 type <integer_type 0x7fd1cb2500a8 sizetype> constant 8> align 32 symtab -884711424 alias set -1 canonical type 0x7fd1cb443348 fields <field_decl 0x7fd1cb4424c0 __val type <array_type 0x7fd1cb443540 type <integer_type 0x7fd1cb250690 int> asm_written no-force-blk BLK size <integer_cst 0x7fd1cb24cb28 64> unit size <integer_cst 0x7fd1cb24cb40 8> align 32 symtab -884711344 alias set -1 canonical type 0x7fd1cb443540 domain <integer_type 0x7fd1cb37fbd0>> nonlocal decl_3 BLK file /usr/include/bits/types.h line 134 col 29 size <integer_cst 0x7fd1cb24cb28 64> unit size <integer_cst 0x7fd1cb24cb40 8> align 32 offset_align 128 offset <integer_cst 0x7fd1cb24cb58 constant 0> bit offset <integer_cst 0x7fd1cb24cba0 constant 0> context <record_type 0x7fd1cb443348 ._0> chain <type_decl 0x7fd1cb442428 ._0 type <record_type 0x7fd1cb4433f0 ._0> nonlocal in_system_header decl_4 VOID file /usr/include/bits/types.h line 134 col 16 align 1 context <record_type 0x7fd1cb443348 ._0> result <record_type 0x7fd1cb443348 ._0> >> context <translation_unit_decl 0x7fd1d19f3078 D.1> full-name "struct<anonymous>" X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown chain <type_decl 0x7fd1cb442390 ._0>> <record_type 0x7fd1cb4433f0 ._0 type_5 BLK size <integer_cst 0x7fd1cb24cb28 type <integer_type 0x7fd1cb250150 bitsizetype> constant 64> unit size <integer_cst 0x7fd1cb24cb40 type <integer_type 0x7fd1cb2500a8 sizetype> constant 8> align 32 symtab 0 alias set -1 canonical type 0x7fd1cb443348 fields <field_decl 0x7fd1cb4424c0 __val type <array_type 0x7fd1cb443540 type <integer_type 0x7fd1cb250690 int> asm_written no-force-blk BLK size <integer_cst 0x7fd1cb24cb28 64> unit size <integer_cst 0x7fd1cb24cb40 8> align 32 symtab -884711344 alias set -1 canonical type 0x7fd1cb443540 domain <integer_type 0x7fd1cb37fbd0>> nonlocal decl_3 BLK file /usr/include/bits/types.h line 134 col 29 size <integer_cst 0x7fd1cb24cb28 64> unit size <integer_cst 0x7fd1cb24cb40 8> align 32 offset_align 128 offset <integer_cst 0x7fd1cb24cb58 constant 0> bit offset <integer_cst 0x7fd1cb24cba0 constant 0> context <record_type 0x7fd1cb443348 ._0> chain <type_decl 0x7fd1cb442428 ._0 type <record_type 0x7fd1cb4433f0 ._0> nonlocal in_system_header decl_4 VOID file /usr/include/bits/types.h line 134 col 16 align 1 context <record_type 0x7fd1cb443348 ._0> result <record_type 0x7fd1cb443348 ._0> >> context <translation_unit_decl 0x7fd1d19f3078 D.1> full-name "struct<anonymous>" X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown chain <type_decl 0x7fd1cb442390 ._0>> /usr/include/bits/types.h:134:16: internal compiler error: verify_type failed 0xe50e82 verify_type(tree_node const*) /home/uros/gcc-svn/trunk/gcc/tree.c:13012 0x8958c4 gen_type_die_with_usage /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:20250 0x8942ad gen_decl_die /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:20987 0x892983 gen_member_die /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:19945 0x892983 gen_struct_or_union_type_die /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:20038 0x892983 gen_tagged_type_die /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:20227 0x89607d gen_type_die_with_usage /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:20381 0x8942ad gen_decl_die /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:20987 0x89507c dwarf2out_decl /home/uros/gcc-svn/trunk/gcc/dwarf2out.c:21397 0xb2253f rest_of_type_compilation(tree_node*, int) /home/uros/gcc-svn/trunk/gcc/passes.c:309 0x5ec7f8 finish_struct_1(tree_node*) /home/uros/gcc-svn/trunk/gcc/cp/class.c:6723 0x5eded4 finish_struct(tree_node*, tree_node*) /home/uros/gcc-svn/trunk/gcc/cp/class.c:6888 0x628662 cp_parser_class_specifier_1 /home/uros/gcc-svn/trunk/gcc/cp/parser.c:19868 0x628662 cp_parser_class_specifier /home/uros/gcc-svn/trunk/gcc/cp/parser.c:20096 0x628662 cp_parser_type_specifier /home/uros/gcc-svn/trunk/gcc/cp/parser.c:14734 0x63cf3d cp_parser_decl_specifier_seq /home/uros/gcc-svn/trunk/gcc/cp/parser.c:11965 0x6506f1 cp_parser_simple_declaration /home/uros/gcc-svn/trunk/gcc/cp/parser.c:11542 0x649973 cp_parser_block_declaration /home/uros/gcc-svn/trunk/gcc/cp/parser.c:11489 0x654522 cp_parser_declaration /home/uros/gcc-svn/trunk/gcc/cp/parser.c:11386 0x652c48 cp_parser_declaration_seq_opt /home/uros/gcc-svn/trunk/gcc/cp/parser.c:11272 Please submit a full bug report, ... Caused by one of: 2015-05-16 Jan HUbicka <hubi...@ucw.cz> * toplev.c (emit_debug_global_declarations): Do not output debug info when doing slim LTO objects. 2015-05-16 Jan HUbicka <hubi...@ucw.cz> * ipa-utils.h (warn_types_mismatch, odr_or_derived_type_p, odr_types_equivalent_p): Declare. (odr_type_p): Use gcc_checking_assert. (type_in_anonymous_namespace_p) Declare. (type_with_linkage_p): Declare. * common.opt (Wlto-type-mismatch): New warning. * ipa-devirt.c (compound_type_base): New function. (odr_or_derived_type_p): New function. (odr_types_equivalent_p): New function. (add_type_duplicate): Simplify. (type_with_linkage_p): Add hack to prevent false positives on C types (type_in_anonymous_namespace_p): Likewise. * tree.c (need_assembler_name_p): Use type_with_linkage. * tree.h (type_in_anonymous_namespace_p): Remove. * doc/invoke.texi (-Wlto-type-mismatch): Document 2015-05-16 Jan HUbicka <hubi...@ucw.cz> * tree.c (verify_type_variant): Verify tree_base and type_common flags. (verify_type): Verify STRING_FLAG.