http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53959
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-14 20:31:49 UTC --- Created attachment 27791 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27791 A testcase With this patch: diff --git a/gcc/gimple.c b/gcc/gimple.c index b419591..988a0aa 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3391,6 +3391,7 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p, struct obstack *sccstate_obstack) { struct sccs *state; + bool foo = true; gcc_assert (p->same_p[GTC_MERGE] == -2); @@ -3422,6 +3423,10 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p, goto different_types; } + /* If their attributes are not the same they can't be the same type. */ + if (!attribute_list_equal (TYPE_ATTRIBUTES (t1), TYPE_ATTRIBUTES (t2))) + foo = false; + /* Do type-specific comparisons. */ switch (TREE_CODE (t1)) { @@ -3660,6 +3665,9 @@ different_types: /* Common exit path for types that are compatible. */ same_types: + if (!foo) + gcc_unreachable (); + gcc_assert (state->u.same_p == 1); pop: I got [hjl@gnu-32 gcc]$ ./lto1 -quiet -dumpbase lucas_distrib_spec.o -mtune=generic -march=x86-64 -mtune=generic -march=x86-64 -auxbase lucas_distrib_spec -O2 -version -ffast-math -fwhole-program -fuse-linker-plugin -fltrans-output-list=/tmp/cc4kxuMN.ltrans.out -fwpa -fresolution=foo.res @foo GNU GIMPLE (GCC) version 4.8.0 20120713 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.1 20120629 (Red Hat 4.7.1-1), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.8.0 20120713 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.1 20120629 (Red Hat 4.7.1-1), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 lto1: internal compiler error: in gimple_types_compatible_p_1, at gimple.c:3669 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-32 gcc]$