From: Richard Biener Date: Thu, 9 Apr 2020 11:54:01 +0000 (+0200) Subject: testsuite/93369 - use -shared to avoid issue with ODR violation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb40460646ce4e6ad27a2f6795106d004d405314;p=gcc.git testsuite/93369 - use -shared to avoid issue with ODR violation 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. 2020-04-09 Richard Biener PR testsuite/93369 * g++.dg/lto/pr64076_0.C: Add -shared -fPIC. * g++.dg/lto/pr64076_1.C: Add -fPIC. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fde4e0fa4a7..ba530077ee2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-04-09 Richard Biener + + PR testsuite/93369 + * g++.dg/lto/pr64076_0.C: Add -shared -fPIC. + * g++.dg/lto/pr64076_1.C: Add -fPIC. + 2020-04-09 Andrea Corallo * gcc.target/aarch64/pr94530.c: New test. 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"