This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/66424] wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit mode
- 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, 05 Jun 2015 06:16:15 +0000
- Subject: [Bug ipa/66424] wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit mode
- Auto-submitted: auto-generated
- References: <bug-66424-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66424
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That looks like undefined behavior in the testcase. fn1 is K&R function with
int argument, like if it was:
void
fn1 (p)
int p;
{
f = 1 ^ e[f ^ (p & 1)];
}
but you are calling it with long long argument instead in fn2. If I change
it to void fn1 (p) long long p; { ... } or void fn1 (int p) { ... } or
change fn2 callers to cast the expressions to (int), it works fine.