2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77506
* array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
appear in an array constructor.
2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77506
* gfortran.dg/pr77506.f90: New test.
From-SVN: r240052
+2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/77506
+ * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
+ appear in an array constructor.
+
2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77507
gfc_restore_last_undo_checkpoint ();
goto cleanup;
}
+
+ if (ts.type == BT_CHARACTER
+ && ts.u.cl && !ts.u.cl->length && !ts.u.cl->length_from_typespec)
+ {
+ gfc_error ("Type-spec at %L cannot contain an asterisk for a "
+ "type parameter", &where);
+ gfc_restore_last_undo_checkpoint ();
+ goto cleanup;
+ }
}
}
else if (m == MATCH_ERROR)
+2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/77506
+ * gfortran.dg/pr77506.f90: New test.
+
2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77507
--- /dev/null
+! { dg-do compile }
+program foo
+ print *, [character(len=*)::'ab','cd'] ! { dg-error "contain an asterisk" }
+end program foo