diff mbox series

[testsuite,pushed] Fix sloppy PR121468 test

Message ID 12227da9-7ad2-4cc4-ac6c-6cb5755fa6bd@gjlay.de
State New
Headers show
Series [testsuite,pushed] Fix sloppy PR121468 test | expand

Commit Message

Georg-Johann Lay Sept. 1, 2026, 5:31 p.m. UTC
gcc.dg/pr121468.c failed with:

FAIL: gcc.dg/pr121468.c (test for excess errors)
Excess errors:
gcc.dg/pr121468.c:17:9: warning: overflow in conversion from 'long int' 
to 'int' changes value from '2147483647' to '-1' [-Woverflow]
gcc.dg/pr121468.c:19:9: warning: overflow in conversion from 'long int' 
to 'int' changes value from '2147483646' to '-2' [-Woverflow]

in the assumptions that the assigned vars are int32plus.

Johann

--

gcc/testsuite/
	PR testsuite/121468
	* gcc.dg/pr121468.c: Use __INT32_TYPE__ for variables that
	obviously require int32plus.
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/pr121468.c 
b/gcc/testsuite/gcc.dg/pr121468.c
index 07df274be83..1e1e0596850 100644
--- a/gcc/testsuite/gcc.dg/pr121468.c
+++ b/gcc/testsuite/gcc.dg/pr121468.c
@@ -1,10 +1,10 @@ 
  /* { dg-do compile } */
  /* { dg-options "-Os" } */
-int e, f, n;
+__INT32_TYPE__ e, f, n;
  static int a () { return e; }
  void b () { while (a()); }
  static int d () { return e; }
-static void g (int h) {
+static void g (__INT32_TYPE__ h) {
    if (e)
    c:
      if (d())