The testcase contains an ODR violation and thus the observed
link failure is an accepted outcome (it originally was for
an ICE during WPA).  Thus the following adds -shared to the link.

Pushed.

2020-04-09  Richard Biener  <rguent...@suse.de>

        PR testsuite/93369
        * g++.dg/lto/pr64076_0.C: Add -shared -fPIC.
        * g++.dg/lto/pr64076_1.C: Add -fPIC.
---
 gcc/testsuite/g++.dg/lto/pr64076_0.C | 4 ++++
 gcc/testsuite/g++.dg/lto/pr64076_1.C | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/lto/pr64076_0.C 
b/gcc/testsuite/g++.dg/lto/pr64076_0.C
index fb9b060e323..57d0fd6a1c3 100644
--- a/gcc/testsuite/g++.dg/lto/pr64076_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr64076_0.C
@@ -1,4 +1,8 @@
 // { dg-lto-do link }
+// { dg-lto-options { { -O0 -flto -shared -fPIC } } }
+// { dg-require-effective-target fpic }
+// { dg-require-effective-target shared }
+// { dg-extra-ld-options "-shared" }
 
 #define XXX
 #include "pr64076.H"
diff --git a/gcc/testsuite/g++.dg/lto/pr64076_1.C 
b/gcc/testsuite/g++.dg/lto/pr64076_1.C
index 4bd00817b1d..c9c58b798ec 100644
--- a/gcc/testsuite/g++.dg/lto/pr64076_1.C
+++ b/gcc/testsuite/g++.dg/lto/pr64076_1.C
@@ -1,4 +1,4 @@
-// { dg-options -fno-lto }
+// { dg-options "-fno-lto -fPIC" }
 
 #include "pr64076.H"
 
-- 
2.25.1

Reply via email to