This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ipa-icf::merge TLC




On 01/03/15 16:47, Christophe Lyon wrote:
On 27 February 2015 at 21:49, Jan Hubicka <hubicka@ucw.cz> wrote:

../sysdeps/gnu/siglist.c:72:1: internal compiler error: in address_matters_p, at symtab.c:1908
  versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_3_3);
  ^
0x66a080 symtab_node::address_matters_p()
         /scratch/sellcey/repos/bootstrap/src/gcc/gcc/symtab.c:1908
0xe7cbe5 ipa_icf::sem_variable::merge(ipa_icf::sem_item*)
         /scratch/sellcey/repos/bootstrap/src/gcc/gcc/ipa-icf.c:1443

Indeed, the ipa-icf should not try to analyze aliases - just prove ekvialence of
definitions they are attached to.  It already does that for functions (bit by accident;
it gives up when there is no gimple body), but it does not do that for variables because
it gets into ctor_for_folding. For that reason it sometimes decides to try to make two
variable aliases alias of each other that is not a good idea, because of possible creation
of loops.

I am just discussing with Martin the fix.

Honza

For the record, I have noticed similar errors on ARM and AArch64
targets, when building glibc.

Christophe.


I confirm ARM and AArch64 failing to build with this patch:

/work/build-aarch64-none-linux-gnu/install//bin/aarch64-none-linux-gnu-gcc ../sysdeps/posix/cuserid.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -fPIC -fexceptions -I../include -I/work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common -I/work/build-aarch64-none-linux-gnu/obj/glibc -I../sysdeps/unix/sysv/linux/aarch64 -I../sysdeps/aarch64/nptl -I../sysdeps/unix/sysv/linux/generic -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/aarch64/fpu -I../sysdeps/aarch64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/aarch64/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /work/build-aarch64-none-linux-gnu/install/bin/../lib/gcc/aarch64-none-linux-gnu/5.0.0/include -isystem /work/build-aarch64-none-linux-gnu/install/bin/../lib/gcc/aarch64-none-linux-gnu/5.0.0/include-fixed -isystem /work/build-aarch64-none-linux-gnu/install//aarch64-none-linux-gnu/libc/usr/include -D_LIBC_REENTRANT -include /work/build-aarch64-none-linux-gnu/obj/glibc/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DSHARED -D_IO_MTSAFE_IO -o /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/cuserid.os -MD -MP -MF /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/cuserid.os.dt -MT /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/cuserid.os ../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);
 ^
*** errlist.c count 134 inflated to GLIBC_2.12 count 135 (old errno.h?)
chmod a-w /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/errlist-compat.cT
0x6b9100 symtab_node::address_matters_p()
	/work/src/gcc/gcc/symtab.c:1908
0xedb4e5 ipa_icf::sem_variable::merge(ipa_icf::sem_item*)
	/work/src/gcc/gcc/ipa-icf.c:1723
0xee03f9 ipa_icf::sem_item_optimizer::merge_classes(unsigned int)
	/work/src/gcc/gcc/ipa-icf.c:2955
0xee6d31 ipa_icf::sem_item_optimizer::execute()
	/work/src/gcc/gcc/ipa-icf.c:2217
0xee8df1 ipa_icf_driver
	/work/src/gcc/gcc/ipa-icf.c:3034
0xee8df1 ipa_icf::pass_ipa_icf::execute(function*)
	/work/src/gcc/gcc/ipa-icf.c:3081
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.
make[2]: *** [/work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/siglist.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/errlist-compat.cT /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/errlist-compat.c

Regards,
Alex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]