------- Comment #1 from pault at gcc dot gnu dot org  2010-02-25 12:42 -------
symbol.c:gfc_symbols_could_alias is the source of this extra temporary (called
by trans-array.c:gfc_could_be_alias and before that
gfc_conv_resolve_dependencies).

I am reading section 12.6 of Adams, Brainerd, Hendrickson, Maine, Martin and
Smith very carefully to understand what is defined and what is not in respect
of actual versus real arguments.

In principle,

subroutine foo (ptr, tar)
  real, target :: tar (:,:)
  real, pointer :: ptr (:,:)
  ptr => tar
end subroutine

could cause troubles in 'one' in the testcase. If I read it correctly, this is
undefined and so processor dependent.  Thus, we could cure the PR very simply
by fixing 'gfc_symbols_could_alias' but I think that it might be a good idea to
warn of the undefined status of the actual argument corresponding to 'ptr'.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-02-25 12:42:15
               date|                            |


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

Reply via email to