testsuite: Fix failure in test pr105586.c [PR107171]

Message ID 8723e38f-f7ee-aac7-7b8d-3dce61038a9f@linux.vnet.ibm.com
State Accepted, archived
Headers
Series testsuite: Fix failure in test pr105586.c [PR107171] |

Checks

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

Commit Message

Surya Kumari Jangala Oct. 13, 2022, 5:02 p.m. UTC
  testsuite: Fix failure in test pr105586.c [PR107171]

The test pr105586.c fails on a big endian system when run in 32bit
mode. The failure occurs as the test case does not guard against
unsupported __int128.

2022-10-13  Surya Kumari Jangala  <jskumari@linux.ibm.com>

gcc/testsuite/
	PR testsuite/107171
	* gcc.target/powerpc/pr105586.c: Guard against unsupported
	__int128.
  

Comments

Kewen.Lin Oct. 26, 2022, 2:47 a.m. UTC | #1
Hi Surya,

on 2022/10/14 01:02, Surya Kumari Jangala via Gcc-patches wrote:
> testsuite: Fix failure in test pr105586.c [PR107171]
> 
> The test pr105586.c fails on a big endian system when run in 32bit
> mode. The failure occurs as the test case does not guard against
> unsupported __int128.
> 

I thought this is taken as an obvious fix and it didn't ask for a
review/approval, but I just noticed it's not committed yet, so I
assumed maybe you meant to ask for an approval?

Then this patch is OK, it's even obvious, thanks!

BR,
Kewen

> 2022-10-13  Surya Kumari Jangala  <jskumari@linux.ibm.com>
> 
> gcc/testsuite/
> 	PR testsuite/107171
> 	* gcc.target/powerpc/pr105586.c: Guard against unsupported
> 	__int128.
> 
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/pr105586.c b/gcc/testsuite/gcc.target/powerpc/pr105586.c
> index bd397f5..3f88a09 100644
> --- a/gcc/testsuite/gcc.target/powerpc/pr105586.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr105586.c
> @@ -1,4 +1,5 @@
>  /* { dg-options "-mdejagnu-tune=power4 -O2 -fcompare-debug -fno-if-conversion -fno-guess-branch-probability" } */
> +/* { dg-require-effective-target int128 } */
>  
>  extern int bar(int i);
  

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/pr105586.c b/gcc/testsuite/gcc.target/powerpc/pr105586.c
index bd397f5..3f88a09 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr105586.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr105586.c
@@ -1,4 +1,5 @@ 
 /* { dg-options "-mdejagnu-tune=power4 -O2 -fcompare-debug -fno-if-conversion -fno-guess-branch-probability" } */
+/* { dg-require-effective-target int128 } */
 
 extern int bar(int i);