From: Jakub Jelinek Date: Tue, 11 Dec 2018 10:28:39 +0000 (+0100) Subject: re PR lto/86004 (Several lto test cases begin failing with r260963) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7e8e26ec9df9b4ff087a290ada6356cf291924d;p=gcc.git re PR lto/86004 (Several lto test cases begin failing with r260963) PR lto/86004 * doc/sourcebuild.texi (lto_incremental): Document new effective target. * lib/target-supports.exp (check_effective_target_lto_incremental): New. * g++.dg/lto/pr69137_0.C: Require lto_incremental effective target. * g++.dg/lto/pr65316_0.C: Likewise. * g++.dg/lto/pr85176_0.C: Likewise. * g++.dg/lto/pr79000_0.C: Likewise. * g++.dg/lto/pr66180_0.C: Likewise. * g++.dg/lto/pr65193_0.C: Likewise. * g++.dg/lto/pr69077_0.C: Likewise. * g++.dg/lto/pr68057_0.C: Likewise. * g++.dg/lto/pr66705_0.C: Likewise. * g++.dg/lto/pr65302_0.C: Likewise. * g++.dg/lto/20091002-1_0.C: Likewise. * g++.dg/lto/pr81940_0.C: Likewise. * g++.dg/lto/pr64043_0.C: Likewise. * g++.dg/lto/pr65549_0.C: Likewise. * g++.dg/lto/pr69133_0.C: Likewise. * gfortran.dg/lto/pr79108_0.f90: Likewise. From-SVN: r266974 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 47e81c541f3..18a1a827ece 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-12-11 Jakub Jelinek + + PR lto/86004 + * doc/sourcebuild.texi (lto_incremental): Document new effective + target. + 2018-12-11 Segher Boessenkool PR target/88145 diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 1204a546c29..224ab89921a 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2265,6 +2265,10 @@ Target keeps null pointer checks, either due to the use of @item lto Compiler has been configured to support link-time optimization (LTO). +@item lto_incremental +Compiler and linker support link-time optimization relocatable linking +with @option{-r} and @option{-flto} options. + @item naked_functions Target supports the @code{naked} function attribute. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0fde3cb395a..79d7b2f8ee9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,25 @@ +2018-12-11 Jakub Jelinek + + PR lto/86004 + * lib/target-supports.exp (check_effective_target_lto_incremental): + New. + * g++.dg/lto/pr69137_0.C: Require lto_incremental effective target. + * g++.dg/lto/pr65316_0.C: Likewise. + * g++.dg/lto/pr85176_0.C: Likewise. + * g++.dg/lto/pr79000_0.C: Likewise. + * g++.dg/lto/pr66180_0.C: Likewise. + * g++.dg/lto/pr65193_0.C: Likewise. + * g++.dg/lto/pr69077_0.C: Likewise. + * g++.dg/lto/pr68057_0.C: Likewise. + * g++.dg/lto/pr66705_0.C: Likewise. + * g++.dg/lto/pr65302_0.C: Likewise. + * g++.dg/lto/20091002-1_0.C: Likewise. + * g++.dg/lto/pr81940_0.C: Likewise. + * g++.dg/lto/pr64043_0.C: Likewise. + * g++.dg/lto/pr65549_0.C: Likewise. + * g++.dg/lto/pr69133_0.C: Likewise. + * gfortran.dg/lto/pr79108_0.f90: Likewise. + 2018-12-10 Jeff Law PR tree-optimization/80520 diff --git a/gcc/testsuite/g++.dg/lto/20091002-1_0.C b/gcc/testsuite/g++.dg/lto/20091002-1_0.C index a59a0cb9505..4ddb3854c64 100644 --- a/gcc/testsuite/g++.dg/lto/20091002-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20091002-1_0.C @@ -1,5 +1,6 @@ // { dg-lto-do link } // { dg-require-effective-target fpic } +// { dg-require-effective-target lto_incremental } // { dg-lto-options {{-fPIC -flto -Wno-return-type}} } // { dg-extra-ld-options "-fPIC -r -nostdlib" } diff --git a/gcc/testsuite/g++.dg/lto/pr64043_0.C b/gcc/testsuite/g++.dg/lto/pr64043_0.C index 9cc5596c358..078668fbfc2 100644 --- a/gcc/testsuite/g++.dg/lto/pr64043_0.C +++ b/gcc/testsuite/g++.dg/lto/pr64043_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -flto -std=c++11 } } } // { dg-extra-ld-options "-r -nostdlib -O2" } class Validator diff --git a/gcc/testsuite/g++.dg/lto/pr65193_0.C b/gcc/testsuite/g++.dg/lto/pr65193_0.C index ceebe51069d..7ac6d6c42e7 100644 --- a/gcc/testsuite/g++.dg/lto/pr65193_0.C +++ b/gcc/testsuite/g++.dg/lto/pr65193_0.C @@ -1,5 +1,6 @@ /* { dg-lto-do link } */ /* { dg-require-effective-target fpic } */ +/* { dg-require-effective-target lto_incremental } */ /* { dg-lto-options {{-fPIC -r -nostdlib -flto -O2 -g -Wno-return-type}} } */ void frexp (int, int *); diff --git a/gcc/testsuite/g++.dg/lto/pr65302_0.C b/gcc/testsuite/g++.dg/lto/pr65302_0.C index 83e1194fb10..1f35c39e8a5 100644 --- a/gcc/testsuite/g++.dg/lto/pr65302_0.C +++ b/gcc/testsuite/g++.dg/lto/pr65302_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -flto -O2 -Wno-return-type } } } // { dg-extra-ld-options "-r -nostdlib -O0" } diff --git a/gcc/testsuite/g++.dg/lto/pr65316_0.C b/gcc/testsuite/g++.dg/lto/pr65316_0.C index 2b9360e29fe..9cd56e31fba 100644 --- a/gcc/testsuite/g++.dg/lto/pr65316_0.C +++ b/gcc/testsuite/g++.dg/lto/pr65316_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -flto -std=c++11 -g2 -fno-lto-odr-type-merging -O2 -Wno-return-type } } } // { dg-extra-ld-options "-r -nostdlib -O2 -fno-lto-odr-type-merging" } diff --git a/gcc/testsuite/g++.dg/lto/pr65549_0.C b/gcc/testsuite/g++.dg/lto/pr65549_0.C index d3ed1dca158..382f7eff711 100644 --- a/gcc/testsuite/g++.dg/lto/pr65549_0.C +++ b/gcc/testsuite/g++.dg/lto/pr65549_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -std=gnu++14 -flto -g -Wno-return-type } { -std=gnu++14 -flto -g -O2 -fno-inline -flto-partition=max -Wno-return-type } } } // { dg-extra-ld-options "-r -nostdlib" } diff --git a/gcc/testsuite/g++.dg/lto/pr66180_0.C b/gcc/testsuite/g++.dg/lto/pr66180_0.C index c22dc284b1b..cfb496bec4a 100644 --- a/gcc/testsuite/g++.dg/lto/pr66180_0.C +++ b/gcc/testsuite/g++.dg/lto/pr66180_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -flto -std=c++14 -r -nostdlib } } } #include namespace { diff --git a/gcc/testsuite/g++.dg/lto/pr66705_0.C b/gcc/testsuite/g++.dg/lto/pr66705_0.C index faf3f2d24c4..ac9a019aa83 100644 --- a/gcc/testsuite/g++.dg/lto/pr66705_0.C +++ b/gcc/testsuite/g++.dg/lto/pr66705_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -O2 -flto -flto-partition=max -fipa-pta } } } // { dg-extra-ld-options "-r -nostdlib" } diff --git a/gcc/testsuite/g++.dg/lto/pr68057_0.C b/gcc/testsuite/g++.dg/lto/pr68057_0.C index 4e124d7f5e8..6f38df4215c 100644 --- a/gcc/testsuite/g++.dg/lto/pr68057_0.C +++ b/gcc/testsuite/g++.dg/lto/pr68057_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } /* { dg-extra-ld-options { -O2 -Wno-odr -r -nostdlib } } */ struct SPxPricer; struct SoPlex { diff --git a/gcc/testsuite/g++.dg/lto/pr69077_0.C b/gcc/testsuite/g++.dg/lto/pr69077_0.C index 10cb05917b9..cee32122da1 100644 --- a/gcc/testsuite/g++.dg/lto/pr69077_0.C +++ b/gcc/testsuite/g++.dg/lto/pr69077_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -O3 -g -flto } } } // { dg-extra-ld-options "-r -nostdlib" } diff --git a/gcc/testsuite/g++.dg/lto/pr69133_0.C b/gcc/testsuite/g++.dg/lto/pr69133_0.C index bd667074b7b..e6f91dfe703 100644 --- a/gcc/testsuite/g++.dg/lto/pr69133_0.C +++ b/gcc/testsuite/g++.dg/lto/pr69133_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -flto -O2 } } } // { dg-extra-ld-options "-r -nostdlib -flto -flto-partition=none -O2" } namespace xercesc_3_1 { diff --git a/gcc/testsuite/g++.dg/lto/pr69137_0.C b/gcc/testsuite/g++.dg/lto/pr69137_0.C index 09367e2109f..7d5ed2d5fc8 100644 --- a/gcc/testsuite/g++.dg/lto/pr69137_0.C +++ b/gcc/testsuite/g++.dg/lto/pr69137_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -std=c++11 -g -flto } } } // { dg-extra-ld-options "-r -nostdlib" } diff --git a/gcc/testsuite/g++.dg/lto/pr79000_0.C b/gcc/testsuite/g++.dg/lto/pr79000_0.C index 1d5c40ee7a5..4a13ae8afb4 100644 --- a/gcc/testsuite/g++.dg/lto/pr79000_0.C +++ b/gcc/testsuite/g++.dg/lto/pr79000_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { "-flto -g" } } // { dg-extra-ld-options "-r -nostdlib" } diff --git a/gcc/testsuite/g++.dg/lto/pr81940_0.C b/gcc/testsuite/g++.dg/lto/pr81940_0.C index 4eba5fd34b7..680217669da 100644 --- a/gcc/testsuite/g++.dg/lto/pr81940_0.C +++ b/gcc/testsuite/g++.dg/lto/pr81940_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -O -flto } } } // { dg-extra-ld-options "-r -nostdlib -g" } diff --git a/gcc/testsuite/g++.dg/lto/pr85176_0.C b/gcc/testsuite/g++.dg/lto/pr85176_0.C index 73767ce42ea..d84b212094c 100644 --- a/gcc/testsuite/g++.dg/lto/pr85176_0.C +++ b/gcc/testsuite/g++.dg/lto/pr85176_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target lto_incremental } // { dg-lto-options { { -flto -g1 } } } // { dg-extra-ld-options "-r -nostdlib" } namespace a { diff --git a/gcc/testsuite/gfortran.dg/lto/pr79108_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr79108_0.f90 index 9c878509a83..e014bf8f33a 100644 --- a/gcc/testsuite/gfortran.dg/lto/pr79108_0.f90 +++ b/gcc/testsuite/gfortran.dg/lto/pr79108_0.f90 @@ -1,4 +1,5 @@ ! { dg-lto-do link } +! { dg-require-effective-target lto_incremental } ! { dg-lto-options {{ -Ofast -flto --param ggc-min-expand=0 --param ggc-min-heapsize=0 }} } ! { dg-extra-ld-options "-r" } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5026c5906cd..aade9d43845 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8014,6 +8014,18 @@ proc check_effective_target_lto { } { } "-flto"] } +# Return 1 if the compiler and linker support incremental link-time +# optimization. + +proc check_effective_target_lto_incremental { } { + if ![check_effective_target_lto] { + return 0 + } + return [check_no_compiler_messages lto_incremental executable { + int main () { return 0; } + } "-flto -r -nostdlib"] +} + # Return 1 if -mx32 -maddress-mode=short can compile, 0 otherwise. proc check_effective_target_maybe_x32 { } {