This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fix for execute/991221-1.c -O1 failure
- To: law at cygnus dot com
- Subject: Re: fix for execute/991221-1.c -O1 failure
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Thu, 30 Dec 1999 20:54:45 +0000 (GMT)
- CC: gcc at gcc dot gnu dot org
Here is the pointerized version of 991221.c .
I know this is not standard C, but I suppose gcc should be able to handle
this. N.B. it works with -O0 but fails when optimizing.
gcc itself uses -1 as a special 'pointer' value in some places.
int main( void )
{
char *totalsize = (char *)80;
char *msize = (char *)64;
if (sizeof(char *) != 4)
exit(0);
if ( totalsize > (char *)(2147483647L * 2UL + 1)
|| (msize != 0 && ((msize - 1) > (char *)(2147483647L * 2UL + 1) )))
abort();
exit( 0 );
}