This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
New testcase
- To: gcc-patches at gcc dot gnu dot org
- Subject: New testcase
- From: Chandra Chavva <cchavva at cygnus dot com>
- Date: Tue, 30 May 2000 15:46:19 -0700 (PDT)
Hi,
I would like to add the following testcase to
gcc/testsuite/gcc.c-torture/execute directory. This testcase fails
when compiled with -O2. The signed value is not casted to unsigned
value while comparing and leads to wrong result.
Thanks
Chandra
void main(void)
{
int is = -32768 ;
unsigned int iu = 0 ;
unsigned int ua ;
ua = ( iu >= is ) ? iu : is ;
if( ua == is )
exit (0);
abort ();
}