summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-05 20:02:43 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-05 20:02:43 +0000
commit063d85f46074cecfaf693f5a0aea19a2dcfa546e (patch)
treead223978dbb0e5d72b3ae3b44a423d530000505f /gcc/fortran
parent987e471f0934eb392e05bf4a9b9f1ceefebb2c8d (diff)
downloadgcc-063d85f46074cecfaf693f5a0aea19a2dcfa546e.tar.gz
2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/58989 * check.c (gfc_check_reshape): ensure that shape is a constant expression. 2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/58989 * gfortran.dg/reshape_6.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/check.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 16703f64dfb..47b9383dac4 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/58989
+ * check.c (gfc_check_reshape): ensure that shape is a constant
+ expression.
+
2013-11-05 Tobias Burnus <burnus@net-b.de>
* lang.opt (fopenmp-simd): New option.
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 758639e27af..1508c744724 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -3277,7 +3277,7 @@ gfc_check_reshape (gfc_expr *source, gfc_expr *shape,
"than %d elements", &shape->where, GFC_MAX_DIMENSIONS);
return false;
}
- else if (shape->expr_type == EXPR_ARRAY)
+ else if (shape->expr_type == EXPR_ARRAY && gfc_is_constant_expr (shape))
{
gfc_expr *e;
int i, extent;