[Bug fortran/97245] ASSOCIATED intrinsic does not recognize a pointer variable the second time it is used

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 2 21:46:29 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97245

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ASSOCIATE intrinsic does    |ASSOCIATED intrinsic does
                   |not recognize a ponter      |not recognize a pointer
                   |variable the second time it |variable the second time it
                   |is used                     |is used
           Keywords|                            |rejects-valid
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #2 from anlauf at gcc dot gnu.org ---
Interesting bug.

The code is accepted if the declaration

  PROCEDURE(proc_void), POINTER:: pADJSensib

is moved into the subroutine.  In the original form, -fdump-fortran-original
shows the following:

    code:
    IF _gfortran_associated[[((formulaciones:padjsensib) ((arg not-present)))]]
      CALL padjsensib ()
    ENDIF
    IF associated[((calculo:padjsensib))]
      CALL padjsensib ()
    ENDIF

This is weird.


More information about the Gcc-bugs mailing list