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.dg/20021205-1.c for 64-bit targets


The gcc.dg/20021205-1.c test seems to fail for all 64-bit targets,
e.g. sparc-sun-solaris2.10:

FAIL: gcc.dg/20021205-1.c (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gcc.dg/20021205-1.c:5:28: warning: cast to pointer from integer of different size

The following trivial patch fixes this, and now the testcase compiles
without warnings on both 32-bit and 64-bit Solaris 10.

Ok for mainline?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2010-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.dg/20021205-1.c (baz): Declare to return __SIZE_TYPE__.

diff -r 639f1353c2b9 gcc/testsuite/gcc.dg/20021205-1.c
--- a/gcc/testsuite/gcc.dg/20021205-1.c	Mon Jan 25 10:22:04 2010 +0000
+++ b/gcc/testsuite/gcc.dg/20021205-1.c	Tue Jan 26 21:50:48 2010 +0100
@@ -1,6 +1,7 @@
 /* dg-do compile */
 /* dg-options "-O3" */
 typedef struct x x;
+__SIZE_TYPE__ baz();
 struct x { char * (*bar) (int); };
 static x **foo() { return ((x**)baz()); }
 int xyzzy()


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