https://gcc.gnu.org/g:5b2cf72ecdd62c7e634f71970e695b241f0eff2b

commit r17-3830-g5b2cf72ecdd62c7e634f71970e695b241f0eff2b
Author: Georg-Johann Lay <[email protected]>
Date:   Tue Sep 1 19:47:12 2026 +0200

    Fix sloppy PR120277 test
    
    gcc.dg/pr120277.c files with
    
    FAIL: gcc.dg/pr120277.c (test for excess errors)
    Excess errors:
    gcc.dg/pr120277.c:14:4: warning: cast to pointer from integer of different 
size [-Wint-to-pointer-cast]
    
    hence using __INTPTR_TYPE__ in involved variables.
    
    gcc/testsuite/
            PR testsuite/120277
            * gcc.dg/pr120277.c (e): Use __INTPTR_TYPE__ instead of long.

Diff:
---
 gcc/testsuite/gcc.dg/pr120277.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pr120277.c b/gcc/testsuite/gcc.dg/pr120277.c
index f291e920db16..69d93692f0ee 100644
--- a/gcc/testsuite/gcc.dg/pr120277.c
+++ b/gcc/testsuite/gcc.dg/pr120277.c
@@ -2,7 +2,7 @@
 /* { dg-options "-O2" } */
 
 int a, b;
-int c(int d, long e) {
+int c(int d, __INTPTR_TYPE__ e) {
   switch (d) {
   case 129:
     a = 1;
@@ -13,7 +13,7 @@ int c(int d, long e) {
   }
   *(int *)e = 0;
 }
-void f(int d, long e) { c(d, e); }
+void f(int d, __INTPTR_TYPE__ e) { c(d, e); }
 void g() {
   int h = b * sizeof(int);
   f(h + 7, h);

Reply via email to