re PR lto/86004 (Several lto test cases begin failing with r260963)
authorJakub Jelinek <jakub@redhat.com>
Tue, 11 Dec 2018 10:28:39 +0000 (11:28 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 11 Dec 2018 10:28:39 +0000 (11:28 +0100)
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

20 files changed:
gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/20091002-1_0.C
gcc/testsuite/g++.dg/lto/pr64043_0.C
gcc/testsuite/g++.dg/lto/pr65193_0.C
gcc/testsuite/g++.dg/lto/pr65302_0.C
gcc/testsuite/g++.dg/lto/pr65316_0.C
gcc/testsuite/g++.dg/lto/pr65549_0.C
gcc/testsuite/g++.dg/lto/pr66180_0.C
gcc/testsuite/g++.dg/lto/pr66705_0.C
gcc/testsuite/g++.dg/lto/pr68057_0.C
gcc/testsuite/g++.dg/lto/pr69077_0.C
gcc/testsuite/g++.dg/lto/pr69133_0.C
gcc/testsuite/g++.dg/lto/pr69137_0.C
gcc/testsuite/g++.dg/lto/pr79000_0.C
gcc/testsuite/g++.dg/lto/pr81940_0.C
gcc/testsuite/g++.dg/lto/pr85176_0.C
gcc/testsuite/gfortran.dg/lto/pr79108_0.f90
gcc/testsuite/lib/target-supports.exp

index 47e81c541f385a1a52d8816debf668b1db705b24..18a1a827ece2e69cd251c9ab0f261abcea5b2f15 100644 (file)
@@ -1,3 +1,9 @@
+2018-12-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR lto/86004
+       * doc/sourcebuild.texi (lto_incremental): Document new effective
+       target.
+
 2018-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
 
        PR target/88145
index 1204a546c29db57b8205cb71904fcb25fc592673..224ab89921a7a8cbe747e6558921f827c5c92fca 100644 (file)
@@ -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.
 
index 0fde3cb395a5cacf4bc54a1c19d846be83e80fa5..79d7b2f8ee9e680c5a57ff2d78a5d4249d69c8dc 100644 (file)
@@ -1,3 +1,25 @@
+2018-12-11  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <law@redhat.com>
 
        PR tree-optimization/80520
index a59a0cb9505dc6c10e5f30ba9655a059d7030e56..4ddb3854c64f7db9e3f9265af2fc545572958f29 100644 (file)
@@ -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" }
 
index 9cc5596c358bc02caa8bcc98343d9d0cba05b0ca..078668fbfc2ab6b3066348fee8c8edfeda030725 100644 (file)
@@ -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
index ceebe51069d8b3323b6672eaf076dfb10467b7c4..7ac6d6c42e7bdeaf0f4dd021de0a48fefbc3de8a 100644 (file)
@@ -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 *);
index 83e1194fb101f7bb5486bf6d493ffbfa14c911d7..1f35c39e8a50193ea7b064761904e0069028e662 100644 (file)
@@ -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" }
 
index 2b9360e29fe7efa5ecede0eaa568c3a531ef26ce..9cd56e31fba3c8eb28c5e13b7710b9cecfd3d7ad 100644 (file)
@@ -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" }
 
index d3ed1dca15879f1f725d0ad40005686d895cf0bc..382f7eff71126b0764a3b24e32eb486270f05489 100644 (file)
@@ -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" }
 
index c22dc284b1bd8bb1fb272f90774fc7e53b33edf0..cfb496bec4ad9757a197d469b4168ec39da60cd7 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-lto-do link }
+// { dg-require-effective-target lto_incremental }
 // { dg-lto-options { { -flto -std=c++14 -r -nostdlib } } }
 #include <memory>
 namespace {
index faf3f2d24c40ba4213ed5bfd8ebc1f422dcae907..ac9a019aa83aba3e580ffb1ef266592318db268b 100644 (file)
@@ -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" }
 
index 4e124d7f5e8892394c38d22839330c67b83ce25b..6f38df4215c8c478ffbbbbbd0f3c900134679f46 100644 (file)
@@ -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 {
index 10cb05917b9cc747bc95770fe17c495f601f9bb7..cee32122da1ed9ac75521600915f9a4bf606ade9 100644 (file)
@@ -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" }
 
index bd667074b7b6e242dc81a873ca36602ddbadb5db..e6f91dfe703bf0641d06b0b9871b21fcd5865be9 100644 (file)
@@ -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 {
index 09367e2109f325c9700b69caffe0dfa6a693b6f7..7d5ed2d5fc8dc40bf61cb174021cb1554becd13e 100644 (file)
@@ -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" }
 
index 1d5c40ee7a530bb6f5b417793864c6ea60648ec1..4a13ae8afb480de0b35d91250a3cd717309db82d 100644 (file)
@@ -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" }
 
index 4eba5fd34b7de95820dd65a5b267ca8dc84d4c5e..680217669daa422f8628f03753d6d9cb7c8d9c36 100644 (file)
@@ -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" }
 
index 73767ce42eaf014d2d9e204da8cc62bdf3338ebf..d84b212094c73669cfb30314578f2404204a21f3 100644 (file)
@@ -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 {
index 9c878509a83c4953d659ec67769cdba93af89809..e014bf8f33ab23715d2e3291400b25be9cee7d9f 100644 (file)
@@ -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" }
 
index 5026c5906cda3f2f1b21afbc9cd270aee1a81129..aade9d438456bee632b68468c958dd16b60d181f 100644 (file)
@@ -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 { } {