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: Enable -fuse-linker-plugin by default when possible, take 2


> Hi,
> here is updated patch with the test -f ../lto-plugin/Makefile trick and extra
> dependency on cc1plugin.
> There are still the failures:
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-alloca-1.C  -O2 -flto -flto-partition=none  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-alloca-1.C  -O2 -flto  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-global-1.C  -O2 -flto -flto-partition=none  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-global-1.C  -O2 -flto  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-1.C  -O2 -flto -flto-partition=none  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-1.C  -O2 -flto  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-2.C  -O2 -flto -flto-partition=none  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-inline-2.C  -O2 -flto  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-1.C  -O2 -flto -flto-partition=none  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-1.C  -O2 -flto  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-2.C  -O2 -flto -flto-partition=none  (test for excess errors)
> ./gcc/testsuite/g++/g++.sum:FAIL: g++.dg/torture/stackalign/eh-vararg-2.C  -O2 -flto  (test for excess errors)
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution,  -O2 -flto 
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/snprintf-chk.c execution,  -O2 -flto 
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/sprintf-chk.c execution,  -O2 -flto 
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/strncpy-chk.c execution,  -O2 -flto 
> ./gcc/testsuite/gcc5/gcc.sum:FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c execution,  -O2 -flto 
> ./gcc/testsuite/gcc2/gcc.sum:FAIL: gcc.c-torture/execute/bcp-1.c execution,  -O2 -flto 
> ./gcc/testsuite/gcc2/gcc.sum:FAIL: gcc.c-torture/execute/eeprof-1.c execution,  -O2 -flto 

Hi,
with today fixes, I am down to 
./gcc/testsuite/gcc/gcc.sum:FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution,  -O2 -flto 
./gcc/testsuite/gcc/gcc.sum:FAIL: gcc.dg/guality/pr41353-1.c  -O2 -flto  line 17 vari == 17

memops-asm is due to fact that we have no way to relate my_memcpy with memcpy
asm("my_memcpy") at the moment. We will need the extra target hook, updates to
lto-symtab and even with that we might still need to fight one-decl rule
problem related to builtins.

gcc.dg/guality/pr41353-1.c is because int vari = 17; is brought static and
consequently optimized away because it is unused.  We are known to be broken
here.

Would be the patch enabling linker plugin OK with those two testcases marked as XFAIL?
(and is there way to mark testcase XFAIL for LTO only?).
As discussed earlier, linker plugin is by no means perfect, but the set of
programs we can compile with it is greater than set of programs we can compile
with collect2 logic alone, so the change should be an improvement.

Honza


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