This is the mail archive of the gcc-bugs@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]

More on Wine-980503/egcs-2.91.25 bug


  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);
}


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