[PUSHED] testsuite: Fix pr99782-1.c for targets that don't support int128

Message ID 20251205213228.160255-1-andrew.pinski@oss.qualcomm.com
State Committed
Commit cb9744aa0449b342236b7d584e2f3cdab72ab09b
Headers
Series [PUSHED] testsuite: Fix pr99782-1.c for targets that don't support int128 |

Commit Message

Andrew Pinski Dec. 5, 2025, 9:32 p.m. UTC
  When I wrote this testcase I forgot to check if the target
supports __int128. This adds the simple check.

Pushed as obvious after testing the testcase.

gcc/testsuite/ChangeLog:

	* gcc.dg/torture/pr99782-1.c: Require intt128 target.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
---
 gcc/testsuite/gcc.dg/torture/pr99782-1.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Jakub Jelinek Dec. 6, 2025, 12:11 a.m. UTC | #1
On Fri, Dec 05, 2025 at 01:32:28PM -0800, Andrew Pinski wrote:
> When I wrote this testcase I forgot to check if the target
> supports __int128. This adds the simple check.

There is not just that.

dg-compile is not a valid directive.
I've added some cleanups too.

Tested on x86_64-linux and i686-linux, committed as obvious.

2025-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/99782
	* gcc.dg/torture/pr99782-1.c: Fix typo, dg-compile -> dg-do compile.
	Use int128 effective target directly on that directive.  Move PR
	comment first.

--- gcc/testsuite/gcc.dg/torture/pr99782-1.c.jj	2025-12-06 01:06:37.762639829 +0100
+++ gcc/testsuite/gcc.dg/torture/pr99782-1.c	2025-12-06 01:07:23.357884822 +0100
@@ -1,7 +1,6 @@
-/* { dg-compile } */
-/* { dg-require-effective-target int128 } */
-/* { dg-additional-options "-mapxf" { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
 /* PR middle-end/99782 */
+/* { dg-do compile { target int128 } } */
+/* { dg-additional-options "-mapxf" { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
 
 int hb;
 

	Jakub
  
Andrew Pinski Dec. 6, 2025, 2:36 a.m. UTC | #2
On Fri, Dec 5, 2025 at 4:11 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Fri, Dec 05, 2025 at 01:32:28PM -0800, Andrew Pinski wrote:
> > When I wrote this testcase I forgot to check if the target
> > supports __int128. This adds the simple check.
>
> There is not just that.
>
> dg-compile is not a valid directive.
> I've added some cleanups too.

Thanks for doing this; this is what I get for trying to fix something
on a day off.

Thanks,
Andrew Pinski

>
> Tested on x86_64-linux and i686-linux, committed as obvious.
>
> 2025-12-06  Jakub Jelinek  <jakub@redhat.com>
>
>         PR middle-end/99782
>         * gcc.dg/torture/pr99782-1.c: Fix typo, dg-compile -> dg-do compile.
>         Use int128 effective target directly on that directive.  Move PR
>         comment first.
>
> --- gcc/testsuite/gcc.dg/torture/pr99782-1.c.jj 2025-12-06 01:06:37.762639829 +0100
> +++ gcc/testsuite/gcc.dg/torture/pr99782-1.c    2025-12-06 01:07:23.357884822 +0100
> @@ -1,7 +1,6 @@
> -/* { dg-compile } */
> -/* { dg-require-effective-target int128 } */
> -/* { dg-additional-options "-mapxf" { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
>  /* PR middle-end/99782 */
> +/* { dg-do compile { target int128 } } */
> +/* { dg-additional-options "-mapxf" { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
>
>  int hb;
>
>
>         Jakub
>
  

Patch

diff --git a/gcc/testsuite/gcc.dg/torture/pr99782-1.c b/gcc/testsuite/gcc.dg/torture/pr99782-1.c
index 76aab18f361..bee439ce504 100644
--- a/gcc/testsuite/gcc.dg/torture/pr99782-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pr99782-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-compile } */
+/* { dg-require-effective-target int128 } */
 /* { dg-additional-options "-mapxf" { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */
 /* PR middle-end/99782 */