summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-09 18:04:23 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-09 18:04:23 +0000
commitedd0f33b436a5aedbfa5bde8f918acd498934a10 (patch)
tree5fdf6aaf776694e7ccabe59f389a6d473b87f874 /gcc/fortran
parentfdb00a8835d1a6645a99f384d0b3f20c8f6c24fa (diff)
downloadgcc-edd0f33b436a5aedbfa5bde8f918acd498934a10.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/array.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index a0afe045b9a..284bf7d92c0 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
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
* intrinsic.c (add_functions): Use correct keyword.
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index 48a7250d108..14e20a36de5 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -1142,6 +1142,15 @@ gfc_match_array_constructor (gfc_expr **result)
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)