On Oct 29, 2024, at 4:15 PM, Alexandre Oliva <ol...@adacore.com> wrote:
> 
> 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.
> 
> Regstrapped on x86_64-linux-gnu; also tested on i686-linux-gnu with
> -fPIE.  Ok to install?

Ok.  But like the last one, watch for yet more refinement from target folks.

> 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.
> ---
> 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 6757e72d8487c..0b59da36786a1 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 2239e286e6a62..2127b12f120bd 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 10135fec9c147..65f2a9532ffd3 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 1fd5daadf0800..1ecf4552f3d09 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 75cd463cbfc2e..fc0a5b33950f1 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 7de7d4a3ce3ad..9fb5dc5256522 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 edbfd5b09ed69..695831e59af51 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 72b57b5923c0d..c6eacc4f92cf9 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;
> 
> 
> 
> -- 
> Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
>   Free Software Activist                   GNU Toolchain Engineer
> More tolerance and less prejudice are key for inclusion and diversity
> Excluding neuro-others for not behaving ""normal"" is *not* inclusive

Reply via email to