[Bug fortran/45019] Aliasing of TARGET dummy argument not detected correctly

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 21 15:57:00 GMT 2010



------- Comment #1 from burnus at gcc dot gnu dot org  2010-07-21 15:57 -------
Confirm. Fails with ifort, gfortran 4.1 and 4.6, and with pgf90. Works with
Crayftn and Pathscale.

I think the scalar constraint does not matter (it's not a restricted pointer as
both actual and dummy are TARGET), intent(IN) does not matter (user constraint)
thus only array alias analysis remains (in dependency.c):

 LHS and RHS are TARGET and (at least) one of them a dummy w/ assumed-shape w/o
CONTIGUOUS.

(The reason for the assumed-shape without CONTIGUOUS constraint is that
otherwise copy in/copy out might happen, which leads to unpredictable results.)


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-21 15:57:34
               date|                            |


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



More information about the Gcc-bugs mailing list