2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66043
* check.c (gfc_check_storage_size): Prevent the direct use of NULL()
in STORAGE_SIZE() reference.
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66043
* gfortran.dg/storage_size_6.f90: New tests.
From-SVN: r223320
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66043
+ * gfortran.dg/storage_size_6.f90: New tests.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66040
bool
gfc_check_storage_size (gfc_expr *a, gfc_expr *kind)
{
+
+ if (a->expr_type == EXPR_NULL)
+ {
+ gfc_error ("Intrinsic function NULL at %L cannot be an actual "
+ "argument to STORAGE_SIZE, because it returns a "
+ "disassociated pointer", &a->where);
+ return false;
+ }
+
if (a->ts.type == BT_ASSUMED)
{
gfc_error ("%qs argument of %qs intrinsic at %L shall not be TYPE(*)",
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66043
+ * gfortran.dg/storage_size_6.f90: New tests.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66040
--- /dev/null
+! { dg-do compile }
+! PR fortran/66043
+!
+! Original code from Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+program p
+ print *, storage_size(null()) ! { dg-error "cannot be an actual" }
+end