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]
Other format: [Raw text]

[Bug ipa/66424] wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit mode


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.


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