https://gcc.gnu.org/g:2ec80c60d4f10dcdbc9fad5d35297bfa432d14aa
commit r15-4997-g2ec80c60d4f10dcdbc9fad5d35297bfa432d14aa Author: Alexandre Oliva <ol...@adacore.com> Date: Thu Nov 7 02:47:06 2024 -0300 [testsuite] disable PIE on ia32 on more tests Multiple tests fail on ia32 with -fPIE enabled by default because of different call sequences required by the call-saved PIC register (no-callee-saved-*.c), uses of the constant pool instead of computing constants (pr100865-*.c), and unexpected matches of esp in get_pc_thunk (sse2-stv-1.c). Disable PIE on them, to match the expectations. for gcc/testsuite/ChangeLog * gcc.target/i386/no-callee-saved-13.c: Disable PIE on ia32. * gcc.target/i386/no-callee-saved-14.c: Likewise. * gcc.target/i386/no-callee-saved-15.c: Likewise. * gcc.target/i386/no-callee-saved-17.c: Likewise. * gcc.target/i386/pr100865-1.c: Likewise. * gcc.target/i386/pr100865-7a.c: Likewise. * gcc.target/i386/pr100865-7c.c: Likewise. * gcc.target/i386/sse2-stv-1.c: Likewise. Diff: --- gcc/testsuite/gcc.target/i386/no-callee-saved-13.c | 1 + gcc/testsuite/gcc.target/i386/no-callee-saved-14.c | 1 + gcc/testsuite/gcc.target/i386/no-callee-saved-15.c | 1 + gcc/testsuite/gcc.target/i386/no-callee-saved-17.c | 1 + gcc/testsuite/gcc.target/i386/pr100865-1.c | 1 + gcc/testsuite/gcc.target/i386/pr100865-7a.c | 1 + gcc/testsuite/gcc.target/i386/pr100865-7c.c | 1 + gcc/testsuite/gcc.target/i386/sse2-stv-1.c | 1 + 8 files changed, 8 insertions(+) diff --git a/gcc/testsuite/gcc.target/i386/no-callee-saved-13.c b/gcc/testsuite/gcc.target/i386/no-callee-saved-13.c index 6757e72d8487..0b59da36786a 100644 --- a/gcc/testsuite/gcc.target/i386/no-callee-saved-13.c +++ b/gcc/testsuite/gcc.target/i386/no-callee-saved-13.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mtune-ctrl=^prologue_using_move,^epilogue_using_move" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern void foo (void); diff --git a/gcc/testsuite/gcc.target/i386/no-callee-saved-14.c b/gcc/testsuite/gcc.target/i386/no-callee-saved-14.c index 2239e286e6a6..2127b12f120b 100644 --- a/gcc/testsuite/gcc.target/i386/no-callee-saved-14.c +++ b/gcc/testsuite/gcc.target/i386/no-callee-saved-14.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mtune-ctrl=^prologue_using_move,^epilogue_using_move" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern void bar (void) __attribute__ ((no_callee_saved_registers)); diff --git a/gcc/testsuite/gcc.target/i386/no-callee-saved-15.c b/gcc/testsuite/gcc.target/i386/no-callee-saved-15.c index 10135fec9c14..65f2a9532ffd 100644 --- a/gcc/testsuite/gcc.target/i386/no-callee-saved-15.c +++ b/gcc/testsuite/gcc.target/i386/no-callee-saved-15.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mtune-ctrl=^prologue_using_move,^epilogue_using_move" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ typedef void (*fn_t) (void) __attribute__ ((no_callee_saved_registers)); extern fn_t bar; diff --git a/gcc/testsuite/gcc.target/i386/no-callee-saved-17.c b/gcc/testsuite/gcc.target/i386/no-callee-saved-17.c index 1fd5daadf080..1ecf4552f3d0 100644 --- a/gcc/testsuite/gcc.target/i386/no-callee-saved-17.c +++ b/gcc/testsuite/gcc.target/i386/no-callee-saved-17.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mtune-ctrl=^prologue_using_move,^epilogue_using_move" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern void foo (void) __attribute__ ((no_caller_saved_registers)); diff --git a/gcc/testsuite/gcc.target/i386/pr100865-1.c b/gcc/testsuite/gcc.target/i386/pr100865-1.c index 75cd463cbfc2..fc0a5b33950f 100644 --- a/gcc/testsuite/gcc.target/i386/pr100865-1.c +++ b/gcc/testsuite/gcc.target/i386/pr100865-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=x86-64" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pr100865-7a.c b/gcc/testsuite/gcc.target/i386/pr100865-7a.c index 7de7d4a3ce3a..9fb5dc525652 100644 --- a/gcc/testsuite/gcc.target/i386/pr100865-7a.c +++ b/gcc/testsuite/gcc.target/i386/pr100865-7a.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3 -march=skylake" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern long long int array[64]; diff --git a/gcc/testsuite/gcc.target/i386/pr100865-7c.c b/gcc/testsuite/gcc.target/i386/pr100865-7c.c index edbfd5b09ed6..695831e59af5 100644 --- a/gcc/testsuite/gcc.target/i386/pr100865-7c.c +++ b/gcc/testsuite/gcc.target/i386/pr100865-7c.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3 -march=skylake -mno-avx2" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern long long int array[64]; diff --git a/gcc/testsuite/gcc.target/i386/sse2-stv-1.c b/gcc/testsuite/gcc.target/i386/sse2-stv-1.c index 72b57b5923c0..c6eacc4f92cf 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-stv-1.c +++ b/gcc/testsuite/gcc.target/i386/sse2-stv-1.c @@ -1,5 +1,6 @@ /* { dg-do compile { target ia32 } } */ /* { dg-options "-O2 -msse2 -mno-stackrealign" } */ +/* { dg-additional-options "-fno-PIE" { target ia32 } } */ unsigned long long a,b,c,d;