This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix gcc.target/s390/pr36822.c on s390-linux


Hi!

This testcase fails on s390-linux (with -m31), as a warning is emitted:
pr36822.c:14: warning: cast to pointer from integer of different size

I think we can safely use unsigned long instead, I've verified that after
reverting the recog.c fix the testcase still ICEs with both -m31 and -m64
and works with current trunk with both -m31 and -m64.

Alternatively, we could add -w to gcc-options or add a dg-warning
conditional on ilp32.

Ok for trunk?

2008-10-30  Jakub Jelinek  <jakub@redhat.com>

	* gcc.target/s390/pr36822.c: Avoid cast to pointer from integer
	of different size warning with -m31.

--- gcc/testsuite/gcc.target/s390/pr36822.c.jj	2008-09-30 16:54:19.000000000 +0200
+++ gcc/testsuite/gcc.target/s390/pr36822.c	2008-10-30 12:12:01.000000000 +0100
@@ -9,7 +9,7 @@ int boo()
 {
   struct {
     unsigned char pad[4096];
-    unsigned long long bar;
+    unsigned long bar;
   } *foo;
   asm volatile( "" : "=m" (*(unsigned long long*)(foo->bar))
 		: "a" (&foo->bar));

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]