This is the mail archive of the gcc@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]

tree level aliasing and call clobber


I noticed that if I try not to mark a variable as escaping, we don't get the function
call to have V_MAY_DEF for that variable.


For an example in this Fortran code:
function i()
INTEGER :: i
INTEGER :: t
call f(t)
t = 2;
call g()
if (t .ne. 2) then
  call abort ()
end if
i = t
end function


t cannot escape from the function as the variable is not marked as a TARGET.
Is there a way to mark the function call for f as clobbering t but not escaping?
Or do I have to modify tree-ssa-operands code to do it correctly?


PS I attached the patch which I am currently working on to make the variable as not
being call clobbered. I use an attribute instead of a bit in the decls' structure
since it seems only to happen for Fortran code.


Thanks,
Andrew Pinski

Attachment: startfortranalias.diff.txt
Description: Text document


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