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 02/03/15 22:04, Christophe Lyon wrote:
On 2 March 2015 at 21:21, Jan Hubicka <hubicka@ucw.cz> wrote:


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:
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

I commited patch for the alias merging yesterda night, so it should be fixed
now.  If it still fails, please fill in a PR with preprocessed testcase so I
can reproduce it in a cross.


On my side, I saw builds complete again starting with r221090, I guess
that's the commit you are referring to?
Hi,

I built with r221117. I see errors while building following targets:
aarch64_be-none-linux-gnu, aarch64_be-none-linux-gnu,
arm-none-linux-gnueabihf, arm-none-linux-gnueabi.

For aarch64_be-none-linux-gnu I reproduce the error like this:

/work/build-aarch64-none-linux-gnu/install//bin/aarch64-none-linux-gnu-gcc /work/src/glibc/sysdeps/gnu/siglist.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -fno-toplevel-reorder -fno-section-anchors -I/work/src/glibc/include -I/work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common -I/work/build-aarch64-none-linux-gnu/obj/glibc -I/work/src/glibc/sysdeps/unix/sysv/linux/aarch64 -I/work/src/glibc/sysdeps/aarch64/nptl -I/work/src/glibc/sysdeps/unix/sysv/linux/generic -I/work/src/glibc/sysdeps/unix/sysv/linux/wordsize-64 -I/work/src/glibc/sysdeps/unix/sysv/linux/include -I/work/src/glibc/sysdeps/unix/sysv/linux -I/work/src/glibc/sysdeps/nptl -I/work/src/glibc/sysdeps/pthread -I/work/src/glibc/sysdeps/gnu -I/work/src/glibc/sysdeps/unix/inet -I/work/src/glibc/sysdeps/unix/sysv -I/work/src/glibc/sysdeps/unix -I/work/src/glibc/sysdeps/posix -I/work/src/glibc/sysdeps/aarch64/fpu -I/work/src/glibc/sysdeps/aarch64 -I/work/src/glibc/sysdeps/wordsize-64 -I/work/src/glibc/sysdeps/ieee754/ldbl-128 -I/work/src/glibc/sysdeps/ieee754/dbl-64/wordsize-64 -I/work/src/glibc/sysdeps/ieee754/dbl-64 -I/work/src/glibc/sysdeps/ieee754/flt-32 -I/work/src/glibc/sysdeps/aarch64/soft-fp -I/work/src/glibc/sysdeps/ieee754 -I/work/src/glibc/sysdeps/generic -I/work/src/glibc -I/work/src/glibc/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 /work/src/glibc/include/libc-symbols.h -D_IO_MTSAFE_IO -o /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/siglist.o -MD -MP -MF /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/siglist.o.dt -MT /work/build-aarch64-none-linux-gnu/obj/glibc/stdio-common/siglist.o /work/src/glibc/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);
 ^
0x6b9140 symtab_node::address_matters_p()
	/work/src/gcc/gcc/symtab.c:1908
0xedb685 ipa_icf::sem_variable::merge(ipa_icf::sem_item*)
	/work/src/gcc/gcc/ipa-icf.c:1740
0xee05b1 ipa_icf::sem_item_optimizer::merge_classes(unsigned int)
	/work/src/gcc/gcc/ipa-icf.c:2979
0xee6f11 ipa_icf::sem_item_optimizer::execute()
	/work/src/gcc/gcc/ipa-icf.c:2236
0xee902e ipa_icf_driver
	/work/src/gcc/gcc/ipa-icf.c:3061
0xee902e ipa_icf::pass_ipa_icf::execute(function*)
	/work/src/gcc/gcc/ipa-icf.c:3108
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.


I see a related ticket opened recently:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65287

Kind regards,
Alex

Thanks,

Christophe.

Honza
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]