This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[egcs-19980628] Linux x86 comaprison bug persists
- To: egcs-bugs at cygnus dot com
- Subject: [egcs-19980628] Linux x86 comaprison bug persists
- From: Hyman Rosen <hymie at prolifics dot com>
- Date: Mon, 29 Jun 1998 16:21:06 -0400
The following code, compiled with -O1 or better, prints "FAILED!".
This has been broken in at least the last three snapshots.
struct fd { unsigned char a, b; } f = { 5 };
struct fd *g() { return &f; }
int h() { return -1; }
int main(int c, char **v)
{
extern int printf(const char *, ...);
struct fd *f = g();
f->b = h();
if (((f->a & 0x7f) & ~0x10) <= 2)
printf("FAILED!\n");
return 0;
}