[gcc r17-3828] Fix sloppy PR121468 test
Georg-Johann Lay
gjl@gcc.gnu.org
Tue Sep 1 17:32:11 GMT 2026
https://gcc.gnu.org/g:9f27f4b1cd94df786f9e88173e4276151ce86362
commit r17-3828-g9f27f4b1cd94df786f9e88173e4276151ce86362
Author: Georg-Johann Lay <avr@gjlay.de>
Date: Tue Sep 1 19:28:10 2026 +0200
Fix sloppy PR121468 test
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.
gcc/testsuite/
PR testsuite/121468
* gcc.dg/pr121468.c: Use __INT32_TYPE__ for variables that
obviously require int32plus.
Diff:
---
gcc/testsuite/gcc.dg/pr121468.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/pr121468.c b/gcc/testsuite/gcc.dg/pr121468.c
index 07df274be834..1e1e05968500 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())
More information about the Gcc-cvs
mailing list