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 middle-end/49733] Missed optimization: Variable value not propagated to remove "if" condition


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49733

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-13 13:42:26 UTC ---
C test case matching the Fortran one, which also shows that the "if" is not
optimized away.

void some_function(void);

void
sub (int *restrict non_aliasing_var)
{
  *non_aliasing_var = 5;
  some_function ();
  if (*non_aliasing_var != 5)
    foobar_();
}


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