This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49733] Missed optimization: Variable value not propagated to remove "if" condition
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Jul 2011 13:43:25 +0000
- Subject: [Bug middle-end/49733] Missed optimization: Variable value not propagated to remove "if" condition
- Auto-submitted: auto-generated
- References: <bug-49733-4@http.gcc.gnu.org/bugzilla/>
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_();
}