diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2010-04-24 20:32:04 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2010-04-24 20:32:04 +0000 |
commit | 8583a5123e24fd75f42d9d1afa610dcce1181623 (patch) | |
tree | bce094af1ae6ff42fe85335230fd8ef39a6ff460 /gcc/fortran/trans-array.c | |
parent | 423b2799961457c7c494e50a727d612318dccae7 (diff) | |
download | gcc-8583a5123e24fd75f42d9d1afa610dcce1181623.zip gcc-8583a5123e24fd75f42d9d1afa610dcce1181623.tar.gz gcc-8583a5123e24fd75f42d9d1afa610dcce1181623.tar.bz2 |
re PR fortran/30073 (Array out of bounds gives name of RHS array not LHS array)
2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30073
PR fortran/43793
* trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
of mucking with a tree directly.
2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30073
PR fortran/43793
gfortran.dg/pr43793.f90: New test.
From-SVN: r158692
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index c3a92bc..1b56189 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -2336,7 +2336,7 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n, name = "unnamed constant"; } - if (descriptor->base.code != COMPONENT_REF) + if (TREE_CODE (descriptor) == VAR_DECL) name = IDENTIFIER_POINTER (DECL_NAME (descriptor)); /* If upper bound is present, include both bounds in the error message. */ |