[Bug fortran/43665] INTENT(IN) etc. optimization of calls: function annotations for noclobber/noescape arguments
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 20 15:58:00 GMT 2010
------- Comment #9 from burnus at gcc dot gnu dot org 2010-07-20 15:58 -------
The procedure 'checkoptional' gets '.rrrw' set as the fn spec.
With -O1, the if after the first "checkoptional" gets properly optimized away
(cf. comment 7 and original test case).
With -O2, the number of arguments is reduced to one (NULL vs. &b) and the
condition
if (b /= 46) error stop 1
is changed to
error stop 1
(cf. -fdump-tree-optimized)
For me it looks as if the "fn spec" information is not moved along when
arguments are eliminated but remain at the previous position. It works if one
swaps the order (i.e. it works if the optional argument is at position one).
Richard, does this make sense or am I completely off track?
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43665
More information about the Gcc-bugs
mailing list