Hi All, The test tries to link with -shared and compile with -fPIC without checking to see if the target actually supports this.
This patch adds effective-target requirements for fpic and shared. Regtested on aarch64-none-elf and x86_64-unknown-linux-gnu and no issues. Committed under the GCC obvious rules. Thanks, Tamar gcc/testsuite/ChangeLog: 2019-01-16 Tamar Christina <tamar.christ...@arm.com> PR debug/88046 * g++.dg/lto/pr88046_0.C: Check for shared and fPIC. --
diff --git a/gcc/testsuite/g++.dg/lto/pr88046_0.C b/gcc/testsuite/g++.dg/lto/pr88046_0.C index a254dd03586b8f79529e318908216993bcd62ff8..734ce86e9b8fb562918bc13bf3db7269362e3bf8 100644 --- a/gcc/testsuite/g++.dg/lto/pr88046_0.C +++ b/gcc/testsuite/g++.dg/lto/pr88046_0.C @@ -1,5 +1,7 @@ // { dg-lto-do link } // { dg-lto-options { { -O2 -fPIC -flto } } } +// { dg-require-effective-target shared } +// { dg-require-effective-target fpic } // { dg-extra-ld-options "-shared -g" } class a {};