Fortran: always reject alternate return specifier as argument of intrinsics
authorHarald Anlauf <anlauf@gmx.de>
Fri, 14 Jan 2022 20:48:15 +0000 (21:48 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 14 Jan 2022 20:48:15 +0000 (21:48 +0100)
commit70e24c9682ddbcade0301665bccd8e7f928d0082
treef65d5e14f75cc52122848566c97b514172399bcb
parentc76b3bc55b4603d38cc948f4076264af5c0b95aa
Fortran: always reject alternate return specifier as argument of intrinsics

The intrinsics MOVE_ALLOC, C_F_POINTER, and C_F_PROCPOINTER require
deferred checks of part of their actual argument types which may be of
"any" type.  This however excludes alternate return specifiers which
therefore must be unconditionally rejected for all standard intrinsics.

gcc/fortran/ChangeLog:

PR fortran/99256
* intrinsic.c: Do not check formal argument type when checking
arguments of intrinsics for alternate return specifiers.

gcc/testsuite/ChangeLog:

PR fortran/99256
* gfortran.dg/altreturn_11.f90: New test.
gcc/fortran/intrinsic.c
gcc/testsuite/gfortran.dg/altreturn_11.f90 [new file with mode: 0644]