This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48197] possible wrong code bug at -O0
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Mar 2011 20:09:34 +0000
- Subject: [Bug c/48197] possible wrong code bug at -O0
- Auto-submitted: auto-generated
- References: <bug-48197-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48197
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-18 20:09:18 UTC ---
That's true, the step from the 3rd to 4th line is wrong.
But that doesn't mean that on LP64 targets it should print 1.
On:
extern void abort (void);
static int y = 0x8000;
int
main ()
{
if (0LL > (0U ^ (short)0x8000))
abort ();
if (0LL > (0U ^ (short)y))
abort ();
return 0;
}
the first test doesn't abort, the second one does.