This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix gcc.target/s390/pr36822.c on s390-linux
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas dot Krebbel at de dot ibm dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Oct 2008 12:16:28 +0100
- Subject: [PATCH] Fix gcc.target/s390/pr36822.c on s390-linux
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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