More on Wine-980503/egcs-2.91.25 bug

Jeffrey A Law law@cygnus.com
Sat Oct 31 04:38:00 GMT 1998


  In message <199805050619.CAA03439@twinkle.roanoke.infi.net>you write:
  >   I've reduced the code from my previous post much further.  The following
  >   program will return a 1 when compiled with [egcs-2.91.25 19980425], but will
  >   return a 0 when compiled with [egcs-1.0.2].
  > 
  > --Jim
  > [Note: egcs-2.91.25 configured with --enable-haifa and --enable-shared]
  > ===========================================================================
  > ===
  > /* File: rce.c                                       */
  > /*   compile with "gcc -fPIC -O2 -c rce.c -o rce.o". */
  > 
  > int ident[2] = { 0, 1 };
  > 
  > void f() {}
  > 
  > int g( short msg, int lParam )
  > {
  >   int result = 0;
  > 
  >   f();
  >   switch(msg)
  >   {
  >   case 0x0081 :
  >     result = ident[lParam>>19]+(short)lParam;
  >     break;
  > 
  >   case 0x0083 :
  >   case 0x0046 :
  >   case 0x0047 :
  >     break;
  > 
  >   case 0x000d :
  >     result = 4;
  >     break;
  > 
  >   case 0x000c :
  >     result = 5;
  >     break;
  > 
  >   default:
  >     result = 1;
  >     break;
  >   }
  >   return result;
  > } 
  > 
  > int main()
  > {
  >   return 1-g(0x81,1);
  > }
This seems to be working find in the egcs-1.1.1 branch.

jeff



More information about the Gcc-bugs mailing list