]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Require effective target pie for pr113197
authorDimitar Dimitrov <dimitar@dinux.eu>
Thu, 24 Oct 2024 16:59:42 +0000 (19:59 +0300)
committerDimitar Dimitrov <dimitar@dinux.eu>
Thu, 24 Oct 2024 17:14:10 +0000 (20:14 +0300)
The test for PR113197 explicitly enables PIE.  But targets without PIE
emit warnings when -fpie is passed (e.g. pru and avr), which causes the
test to fail.

Fix by adding an effective target requirement for PIE.

With this patch, the test now is marked as unsupported for
pru-unknown-elf.  Testing for x86_64-pc-linux-gnu passes with current
mainline, and fails if the fix from r15-4018-g02f4efe3c12cf7 is
reverted.

PR ipa/113197

gcc/testsuite/ChangeLog:

* gcc.dg/lto/pr113197_0.c: Require effective target pie.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
gcc/testsuite/gcc.dg/lto/pr113197_0.c

index 293c8207dee06818f8102d0a888f24f889db60ad..6fd86245d30a4b918fc74a14c04b28b547428496 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-lto-do link } */
+/* { dg-require-effective-target pie } */
 /* { dg-lto-options { { -O -flto -fpie } } } */
 /* { dg-extra-ld-options { -r -nostdlib -flinker-output=nolto-rel } } */