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 fortran/23169] INTENT information not used in the middle-end for optimizations



------- Comment #7 from dfranke at gcc dot gnu dot org  2008-12-29 14:25 -------
(In reply to comment #4)
> Here is a testcase which we would not get unless we take intent(in) into
> account:
[...]
> foo should always be zero as bar should not be able to touch b or c.

Is this really related to the INTENT? For the equivalent C/C++ cases, I tried
prototypes with int, int*, const int*, int& and const int& respectively -- only
if the arguments are passed by value, the return value of foo is optimized to
zero (as shown by "-O3 -fdump-tree-optimized").


-- 


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


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