https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89075
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-checking, lto Status|UNCONFIRMED |NEW Last reconfirmed| |2019-01-28 CC| |hubicka at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Component|lto |middle-end Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. Looks like the pointer type was not properly shared since it looks equal otherwise. Both are built via #6 0x0000000001596d76 in build_qualified_type ( type=<pointer_type 0x7ffff69c6b28 a>, type_quals=0) at /space/rguenther/src/svn/trunk2/gcc/tree.c:6445 #7 0x0000000001592e9b in free_lang_data_in_type ( type=<function_type 0x7ffff69c65e8 c>, fld=0x7fffffffda60) at /space/rguenther/src/svn/trunk2/gcc/tree.c:5462 #8 0x0000000001595f53 in free_lang_data_in_cgraph (fld=0x7fffffffda60) at /space/rguenther/src/svn/trunk2/gcc/tree.c:6179 #6 0x0000000001596d76 in build_qualified_type ( type=<pointer_type 0x7ffff69c6b28 a>, type_quals=0) at /space/rguenther/src/svn/trunk2/gcc/tree.c:6445 #7 0x0000000001592e9b in free_lang_data_in_type ( type=<function_type 0x7ffff69c63f0 b>, fld=0x7fffffffda60) at /space/rguenther/src/svn/trunk2/gcc/tree.c:5462 #8 0x0000000001595f53 in free_lang_data_in_cgraph (fld=0x7fffffffda60) at /space/rguenther/src/svn/trunk2/gcc/tree.c:6179 but get_qualified_type doesn't find the duplicate becase the type we're creating the qualified variant off has TYPE_NAME still as TYPE_DECL while the one on the variant list is fld-ed already with an IDENTIFIER_NODE because we do #4 0x0000000001592e9b in free_lang_data_in_type ( type=<function_type 0x7ffff69c63f0 b>, fld=0x7fffffffda60) at /space/rguenther/src/svn/trunk2/gcc/tree.c:5462 (gdb) l 5457 if (TYPE_READONLY (arg_type) || TYPE_VOLATILE (arg_type)) 5458 { 5459 int quals = TYPE_QUALS (arg_type) 5460 & ~TYPE_QUAL_CONST 5461 & ~TYPE_QUAL_VOLATILE; 5462 TREE_VALUE (p) = build_qualified_type (arg_type, quals); 5463 free_lang_data_in_type (TREE_VALUE (p), fld); but arg_type itself is only fld'ed later. Which means we need to free-lang-data in SCCs?