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]

Re: New testcase



  In message <Pine.SOL.3.91.1000530153930.23916A-100000@emperor.cygnus.com>you 
write:
  > 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 ();
  > }
The testcase is fine.

For the lurkers on the list -- the test fails due to a local change in Cygnus's
tree that was losing a type conversion.

jeff


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