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 14:06:21 +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 #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-13 14:06:17 UTC ---
(In reply to comment #1)
> C test case matching the Fortran one, which also shows that the "if" is not
> optimized away.
According to Ian (cf. thread linked to in comment 0), C99's restrict does not
guarantee that the value remains the same after a function call. Assuming
that's the case, then C does not seem to have an equivalent qualifier to
Fortran's nontarget/nonasynchronous/nonpointer* variables. - And, hence, some
tree flag is missing to for such nonpointer* Fortran variables. (* pointer in
the Fortran sense.)
I failed to see this from C99's "6.7.3.1 Formal definition of restrict", which
is written in a rather convoluted way.