PR fortran/95544 - Fix ICE in NULL() argument to intrinsics
Fortran 2018: An argument to an intrinsic procedure other than ASSOCIATED,
NULL, or PRESENT shall be a data object. An EXPR_NULL is not a data
object. Add checks for intrinsics.
2020-06-11 Steven G. Kargl <kargl@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
gcc/fortran/
PR fortran/95544
* check.c (invalid_null_arg): Rename to gfc_invalid_null_arg.
(gfc_check_associated, gfc_check_kind, gfc_check_merge)
(gfc_check_shape, gfc_check_size, gfc_check_spread)
(gfc_check_transfer): Adjust.
(gfc_check_len_lentrim, gfc_check_trim): Check for NULL() argument.
* gfortran.h: Declare gfc_invalid_null_arg ().
* intrinsic.c (check_arglist): Check for NULL() argument.