More on Wine-980503/egcs-2.91.25 bug
Jim Peterson
jspeter@roanoke.infi.net
Tue May 5 00:50:00 GMT 1998
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);
}
More information about the Gcc-bugs
mailing list