aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2007-03-16 11:57:45 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2007-03-16 11:57:45 +0100
commit945a98a4b2deb725bdd3f93801a2eeb8e262cca0 (patch)
tree91abe22811a811a95816cc71f77c52bbf6e574d4 /gcc/fortran/expr.c
parent7c62b943baf5ef56622033f55a8eb9458e3d18be (diff)
downloadgcc-945a98a4b2deb725bdd3f93801a2eeb8e262cca0.zip
gcc-945a98a4b2deb725bdd3f93801a2eeb8e262cca0.tar.gz
gcc-945a98a4b2deb725bdd3f93801a2eeb8e262cca0.tar.bz2
[multiple changes]
2007-03-16 Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/31188 * expr.c (find_array_section): Allow non-expression-constant variables. 2007-03-16 Tobias Burnus <burnus@net-b.de> PR fortran/31188 * gfortran.dg/parameter_array_dummy.f90: New test. From-SVN: r122987
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 06f4d20..bf5b74d 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1063,7 +1063,13 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
if (ref->u.ar.dimen_type[d] == DIMEN_VECTOR) /* Vector subscript. */
{
gcc_assert (begin);
- gcc_assert (begin->expr_type == EXPR_ARRAY);
+
+ if (begin->expr_type != EXPR_ARRAY)
+ {
+ t = FAILURE;
+ goto cleanup;
+ }
+
gcc_assert (begin->rank == 1);
gcc_assert (begin->shape);