]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: don't link top-level asm tests as PIE [PR 70150]
authorXi Ruoyao <xry111@xry111.site>
Fri, 1 May 2026 18:15:42 +0000 (02:15 +0800)
committerXi Ruoyao <xry111@xry111.site>
Sat, 2 May 2026 14:42:43 +0000 (22:42 +0800)
If these tests are linked as PIE, the linker ends up creating runtime
text relocation and warns or errors out.

gcc/testsuite/

PR testsuite/70150
* gcc.dg/ipa/pr122458.c (dg-options): Add -no-pie.
* gcc.dg/lto/toplevel-extended-asm-1_0.c (dg-lto-options): Add
-no-pie.
* gcc.dg/lto/toplevel-simple-asm-1_0.c (dg-lto-options): Add
-no-pie.

gcc/testsuite/gcc.dg/ipa/pr122458.c
gcc/testsuite/gcc.dg/lto/toplevel-extended-asm-1_0.c
gcc/testsuite/gcc.dg/lto/toplevel-simple-asm-1_0.c

index 85f26f151752a9a27abac0bacea5e872605ffcee..afe283b1972e5a782c36d6e691fbdef269d7151f 100644 (file)
@@ -1,6 +1,6 @@
 /* PR ipa/122458 */
 /* { dg-do link } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -no-pie" } */
 /* { dg-xfail-if ".dc.a is a gas extension" { ! gas } } */
 
 static int foo (void) { return 0; };
index c1d2fc56b9c33a4df785f68846f4a87ab3540a35..ddceaf6b5035aa70dc72d5a563bcba837bd6d399 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-lto-do link } */
-/* { dg-lto-options {{-O2 -flto -flto-partition=1to1} } } */
+/* { dg-lto-options {{-O2 -flto -flto-partition=1to1 -no-pie} } } */
 
 void asm_fn();
 void asm_fn_used();
index 9d653d4c7a3573f3748bbc41ed09433a065e7c6c..7ceb380c5251937309a8f08de41ad077e9490375 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-lto-do link } */
-/* { dg-lto-options { {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=1to1} {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=max} {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=cache}} } */
+/* { dg-lto-options { {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=1to1 -no-pie} {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=max -no-pie} {-O2 -flto -flto-toplevel-asm-heuristics -flto-partition=cache -no-pie}} } */
 
 void asm_fn();
 void asm_fn_used();