[Bug fortran/126519] Actual rank of an assumed rank dummy incorrect if the actual arg is an absent optional

"kargl at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126519

Steve Kargl <kargl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from Steve Kargl <kargl at gcc dot gnu.org> ---
Looks like the programmer needs a few 'if (present(a)) then ... endif' block.

The code may be violating 

  F2023: 15.5.2.13 Argument presence and restrictions on arguments not present
  ...
  An optional dummy argument that is not present is subject to the following
  restrictions.

    (1) If it is a data object, it shall not be referenced or be defined. ...
    ...
    (4) It shall not be supplied as an actual argument corresponding to a
        nonoptional dummy argument other than as the argument of the
        intrinsic function PRESENT or as an argument of a function
        reference that is a constant expression.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.