testsuite: don't link top-level asm tests as PIE [PR 70150]

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.
This commit is contained in:
Xi Ruoyao
2026-05-02 02:15:42 +08:00
parent 5f4e2f10f4
commit c0c911821b
3 changed files with 3 additions and 3 deletions

View 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; };

View 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();

View 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();