testsuite: skip gcc.target/i386/pr106910-1.c test when using newlib

Message ID 20231106105831.3861671-1-poulhies@adacore.com
State Accepted
Headers
Series testsuite: skip gcc.target/i386/pr106910-1.c test when using newlib |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Marc Poulhiès Nov. 6, 2023, 10:57 a.m. UTC
  Using newlib produces a different codegen because the support for c99
differs (see libc_has_function hook).

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr106910-1.c: Disable for newlib.
---
Tested on x86_64-linux and x86_64-elf.

OK for master?

 gcc/testsuite/gcc.target/i386/pr106910-1.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Marc Poulhiès Dec. 1, 2023, 4:24 p.m. UTC | #1
Marc Poulhiès <poulhies@adacore.com> writes:

> Using newlib produces a different codegen because the support for c99
> differs (see libc_has_function hook).
>
> gcc/testsuite/ChangeLog:
>
> 	* gcc.target/i386/pr106910-1.c: Disable for newlib.
> ---
> Tested on x86_64-linux and x86_64-elf.
>
> OK for master?
>
>  gcc/testsuite/gcc.target/i386/pr106910-1.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gcc/testsuite/gcc.target/i386/pr106910-1.c b/gcc/testsuite/gcc.target/i386/pr106910-1.c
> index c7685a32183..00c93f444b6 100644
> --- a/gcc/testsuite/gcc.target/i386/pr106910-1.c
> +++ b/gcc/testsuite/gcc.target/i386/pr106910-1.c
> @@ -1,4 +1,6 @@
> +
>  /* { dg-do compile { target { ! ia32 } } } */
> +/* { dg-skip-if "newlib libc math causes different codegen" { newlib } } */
>  /* { dg-options "-msse4.1 -O2 -Ofast" } */
>  /* { dg-final { scan-assembler-times "roundps" 9 } } */
>  /* { dg-final { scan-assembler-times "cvtps2dq" 1 } } */

Ping.

Thanks,
Marc
  
Mike Stump Dec. 1, 2023, 5:17 p.m. UTC | #2
On Nov 6, 2023, at 2:57 AM, Marc Poulhiès <poulhies@adacore.com> wrote:
> 
> Using newlib produces a different codegen because the support for c99
> differs (see libc_has_function hook).
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/i386/pr106910-1.c: Disable for newlib.
> ---
> Tested on x86_64-linux and x86_64-elf.
> 
> OK for master?

Ok, but nix the first blank line?

> gcc/testsuite/gcc.target/i386/pr106910-1.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/gcc/testsuite/gcc.target/i386/pr106910-1.c b/gcc/testsuite/gcc.target/i386/pr106910-1.c
> index c7685a32183..00c93f444b6 100644
> --- a/gcc/testsuite/gcc.target/i386/pr106910-1.c
> +++ b/gcc/testsuite/gcc.target/i386/pr106910-1.c
> @@ -1,4 +1,6 @@
> +

This one.

> /* { dg-do compile { target { ! ia32 } } } */
> +/* { dg-skip-if "newlib libc math causes different codegen" { newlib } } */
> /* { dg-options "-msse4.1 -O2 -Ofast" } */
> /* { dg-final { scan-assembler-times "roundps" 9 } } */
> /* { dg-final { scan-assembler-times "cvtps2dq" 1 } } */
  

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr106910-1.c b/gcc/testsuite/gcc.target/i386/pr106910-1.c
index c7685a32183..00c93f444b6 100644
--- a/gcc/testsuite/gcc.target/i386/pr106910-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr106910-1.c
@@ -1,4 +1,6 @@ 
+
 /* { dg-do compile { target { ! ia32 } } } */
+/* { dg-skip-if "newlib libc math causes different codegen" { newlib } } */
 /* { dg-options "-msse4.1 -O2 -Ofast" } */
 /* { dg-final { scan-assembler-times "roundps" 9 } } */
 /* { dg-final { scan-assembler-times "cvtps2dq" 1 } } */