[committed] testsuite: Fix up pr64536.c for LLP64 targets [PR108151]

Message ID Y6BwMS8xkhs1IKk1@tucnak
State Unresolved
Headers
Series [committed] testsuite: Fix up pr64536.c for LLP64 targets [PR108151] |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jakub Jelinek Dec. 19, 2022, 2:07 p.m. UTC
  Hi!

Apparently llp64 had 2 further warnings, fixed thusly.

Committed as obvious after testing it with cross to mingw.

2022-12-19  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/108151
	* gcc.dg/pr64536.c (bar): Cast long to __INTPTR_TYPE__
	before casting to long *.


	Jakub
  

Patch

--- gcc/testsuite/gcc.dg/pr64536.c.jj
+++ gcc/testsuite/gcc.dg/pr64536.c
@@ -40,7 +40,7 @@  bar (int x)
 	      h->q = *f;
 	    }
 	  else
-	    i = (long *) (h->q = *f);
+	    i = (long *) (__INTPTR_TYPE__) (h->q = *f);
 	  *c++ = (__INTPTR_TYPE__) f;
 	  e += 6;
 	}
@@ -54,7 +54,7 @@  bar (int x)
 	      h->q = *f;
 	    }
 	  else
-	    i = (long *) (h->q = *f);
+	    i = (long *) (__INTPTR_TYPE__) (h->q = *f);
 	  *c++ = (__INTPTR_TYPE__) f;
 	  e += 6;
 	}