On Thu, Nov 12, 2026 at 9:14 AM Kumar M D, Hemanth
<[email protected]> wrote:
>
> Ping.
> ________________________________
> From: Kumar M D, Hemanth
> Sent: Tuesday, October 6, 2026 10:32 AM
> To: [email protected] <[email protected]>
> Cc: Kokkonda, Sundeep <[email protected]>; 
> [email protected] <[email protected]>
> Subject: [PATCH v2] testsuite: i386: Fix mv/mvc-symbols*.C with PIE enabled 
> [PR125126]
>
> From: Sowmya Sathram <[email protected]>
>
> When GCC is built with --enable-default-pie, calls to the ifunc/resolver
> symbols go through the PLT, so the "call" instructions carry an "@PLT"
> suffix.  This made the following tests fail
>
> FAIL: g++.target/i386/mv-symbols1.C
> FAIL: g++.target/i386/mv-symbols3.C
> FAIL: g++.target/i386/mv-symbols4.C
> FAIL: g++.target/i386/mv-symbols5.C
> FAIL: g++.target/i386/mvc-symbols1.C
> FAIL: g++.target/i386/mvc-symbols3.C
>
> This patch fixes only the x86 part of PR125126; the aarch64 failures
> listed in the PR are still open.
>
>         PR testsuite/125126
>
> gcc/testsuite/ChangeLog:
>
>         * g++.target/i386/mv-symbols1.C: Add optional (@PLT)? to the
>         call scan-assembler patterns.
>         * g++.target/i386/mv-symbols3.C: Likewise.
>         * g++.target/i386/mv-symbols4.C: Likewise.
>         * g++.target/i386/mv-symbols5.C: Likewise.
>         * g++.target/i386/mvc-symbols1.C: Likewise.
>         * g++.target/i386/mvc-symbols3.C: Likewise.

OK for trunk, but please also confirm that the tests pass with
-m32 on a default-PIE build, in addition to -m64.

Thanks,
Uros.

>
> Signed-off-by: Sowmya Sathram <[email protected]>
> Signed-off-by: Hemanth Kumar M D <[email protected]>
> ---
>  gcc/testsuite/g++.target/i386/mv-symbols1.C  | 4 ++--
>  gcc/testsuite/g++.target/i386/mv-symbols3.C  | 2 +-
>  gcc/testsuite/g++.target/i386/mv-symbols4.C  | 2 +-
>  gcc/testsuite/g++.target/i386/mv-symbols5.C  | 2 +-
>  gcc/testsuite/g++.target/i386/mvc-symbols1.C | 4 ++--
>  gcc/testsuite/g++.target/i386/mvc-symbols3.C | 4 ++--
>  6 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/gcc/testsuite/g++.target/i386/mv-symbols1.C 
> b/gcc/testsuite/g++.target/i386/mv-symbols1.C
> index 3163f03ddd8..4eeda323bcc 100644
> --- a/gcc/testsuite/g++.target/i386/mv-symbols1.C
> +++ b/gcc/testsuite/g++.target/i386/mv-symbols1.C
> @@ -55,7 +55,7 @@ int bar(int x)
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.arch_slm:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.sse4.2:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc(@PLT)?\n" 1 } 
> } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov.ifunc, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3foov.ifunc,_Z3foov\.resolver\n" 1 } } */
>
> @@ -63,6 +63,6 @@ int bar(int x)
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.arch_slm:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.sse4.2:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi.ifunc\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi.ifunc(@PLT)?\n" 1 } 
> } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi.ifunc, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3fooi.ifunc,_Z3fooi\.resolver\n" 1 } } */
> diff --git a/gcc/testsuite/g++.target/i386/mv-symbols3.C 
> b/gcc/testsuite/g++.target/i386/mv-symbols3.C
> index 67b27351143..143926dcfaa 100644
> --- a/gcc/testsuite/g++.target/i386/mv-symbols3.C
> +++ b/gcc/testsuite/g++.target/i386/mv-symbols3.C
> @@ -32,7 +32,7 @@ int bar()
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.arch_slm:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.sse4.2:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc(@PLT)?\n" 1 } 
> } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov.ifunc, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3foov.ifunc,_Z3foov\.resolver\n" 1 } } */
>
> diff --git a/gcc/testsuite/g++.target/i386/mv-symbols4.C 
> b/gcc/testsuite/g++.target/i386/mv-symbols4.C
> index c82db70da35..5fd93d283e3 100644
> --- a/gcc/testsuite/g++.target/i386/mv-symbols4.C
> +++ b/gcc/testsuite/g++.target/i386/mv-symbols4.C
> @@ -38,7 +38,7 @@ int bar()
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.arch_slm:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.sse4.2:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc(@PLT)?\n" 1 } 
> } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov.ifunc, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3foov.ifunc,_Z3foov\.resolver\n" 1 } } */
>
> diff --git a/gcc/testsuite/g++.target/i386/mv-symbols5.C 
> b/gcc/testsuite/g++.target/i386/mv-symbols5.C
> index 7792f113f22..9c21a6e863e 100644
> --- a/gcc/testsuite/g++.target/i386/mv-symbols5.C
> +++ b/gcc/testsuite/g++.target/i386/mv-symbols5.C
> @@ -44,7 +44,7 @@ int bar()
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.arch_slm:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.sse4.2:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov.ifunc(@PLT)?\n" 1 } 
> } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov.ifunc, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3foov.ifunc,_Z3foov\.resolver\n" 1 } } */
>
> diff --git a/gcc/testsuite/g++.target/i386/mvc-symbols1.C 
> b/gcc/testsuite/g++.target/i386/mvc-symbols1.C
> index ea8c434c353..d2ea22c1614 100644
> --- a/gcc/testsuite/g++.target/i386/mvc-symbols1.C
> +++ b/gcc/testsuite/g++.target/i386/mvc-symbols1.C
> @@ -31,7 +31,7 @@ int bar(int x)
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.arch_slm:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.sse4_2:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(@PLT)?\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
>
> @@ -39,6 +39,6 @@ int bar(int x)
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.arch_slm:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.sse4_2:\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(@PLT)?\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */
> diff --git a/gcc/testsuite/g++.target/i386/mvc-symbols3.C 
> b/gcc/testsuite/g++.target/i386/mvc-symbols3.C
> index 33927071028..a81ffb73ce3 100644
> --- a/gcc/testsuite/g++.target/i386/mvc-symbols3.C
> +++ b/gcc/testsuite/g++.target/i386/mvc-symbols3.C
> @@ -22,7 +22,7 @@ int bar(int x)
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.arch_slm:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.sse4_2:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3foov\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3foov(@PLT)?\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3foov, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3foov,_Z3foov\.resolver\n" 1 } } */
>
> @@ -30,6 +30,6 @@ int bar(int x)
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.arch_slm:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.sse4_2:\n" 0 } } */
>  /* { dg-final { scan-assembler-times "\n_Z3fooi\.resolver:\n" 1 } } */
> -/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi\n" 1 } } */
> +/* { dg-final { scan-assembler-times "\n\tcall\t_Z3fooi(@PLT)?\n" 1 } } */
>  /* { dg-final { scan-assembler-times "\n\t\.type\t_Z3fooi, 
> @gnu_indirect_function\n" 1 } } */
>  /* { dg-final { scan-assembler-times 
> "\n\t\.set\t_Z3fooi,_Z3fooi\.resolver\n" 1 } } */
> --
> 2.49.0
>

Reply via email to