The attached patch fixes a couple of cases where an invalid NULL() argument provided to intrinsics produced either an ICE or was silently accepted. We now reject them.
Steve Kargl provided an initial version, which I extended to catch a few more cases. Regtests with no new failures on x86_64-pc-linux-gnu. OK for master? Thanks, Harald 2020-05-04 Steve Kargl <ka...@gcc.gnu.org> Harald Anlauf <anl...@gmx.de> PR fortran/93366 * check.c (gfc_check_associated, invalid_null_arg): Factorize check for presence of invalid NULL() argument. (gfc_check_kind, gfc_check_merge, gfc_check_shape) (gfc_check_sizeof, gfc_check_spread, gfc_check_transfer): Use this check for presence of invalid NULL() arguments. 2020-05-04 Harald Anlauf <anl...@gmx.de> PR fortran/93366 * gfortran.dg/pr93366.f90: New test.
pr93366-patch
Description: Binary data
pr93366-testcase-patch
Description: Binary data