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]

[egcs-19980628] Linux x86 comaprison bug persists


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


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