Created attachment 34927 [details] test case Continued from PR 65263 r221040 is also possibly causing: ../sysdeps/gnu/siglist.c:77:1: internal compiler error: in address_matters_p, at symtab.c:1908 when building trunk GLIBC (seen with GCC @r221125; same source builds with GCC @r220312). ../sysdeps/gnu/siglist.c:77:1: internal compiler error: in address_matters_p, at symtab.c:1908 versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1); ^ 0x747118 symtab_node::address_matters_p() ../../gcc/symtab.c:1908 0x10e1dcb ipa_icf::sem_variable::merge(ipa_icf::sem_item*) ../../gcc/ipa-icf.c:1723 0x10e4b21 ipa_icf::sem_item_optimizer::merge_classes(unsigned int) ../../gcc/ipa-icf.c:2955 0x10ed8c4 ipa_icf::sem_item_optimizer::execute() ../../gcc/ipa-icf.c:2217 0x10ef521 ipa_icf_driver ../../gcc/ipa-icf.c:3034 0x10ef521 ipa_icf::pass_ipa_icf::execute(function*) ../../gcc/ipa-icf.c:3081 Please submit a full bug report, Reproduces with: gcc-svn-r221125/bin/gcc -c -O2 /tmp/t.i
Created attachment 34928 [details] c-reduce'd test case A much shorter test: const int __new_sys_siglist[] = {}; extern __typeof(__new_sys_siglist) _new_sys_siglist __attribute__((alias("__new_sys_siglist"))); extern __typeof(__new_sys_siglist) _sys_siglist __attribute__((alias("__new_sys_siglist")));
Confirmed on both x86_64 and powerpc64-linux.
Also faced this bug when I tired to cross compile for aarch64-none-linux-gnu
The testcase in Comment 1 started ICEing with r221099.
Created attachment 34935 [details] Suggested patch Following patch skips all alias variables. This condition was part of my initial version of patch: https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01753.html I hope, as Honza rework the patch, this condition should be placed there.
I also confirm this issue for aarch64_be-none-linux-gnu, aarch64_be-none-linux-gnu, arm-none-linux-gnueabihf and arm-none-linux-gnueabi
*** Bug 65288 has been marked as a duplicate of this bug. ***
Author: hubicka Date: Tue Mar 3 17:32:21 2015 New Revision: 221156 URL: https://gcc.gnu.org/viewcvs?rev=221156&root=gcc&view=rev Log: PR ipa/65287 * ipa-icf.c (sem_variable::parse): Skip all alias variables. * gcc.dg/ipa/pr65287.c: New test. Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-icf.c trunk/gcc/testsuite/ChangeLog
Author: hubicka Date: Tue Mar 3 17:33:22 2015 New Revision: 221157 URL: https://gcc.gnu.org/viewcvs?rev=221157&root=gcc&view=rev Log: PR ipa/65287 * gcc.dg/ipa/pr65287.c: New test. Added: trunk/gcc/testsuite/gcc.dg/ipa/pr65287.c
Fixed.