diff options
author | Tobias Burnus <burnus@net-b.de> | 2011-07-17 16:52:46 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-07-17 16:52:46 +0200 |
commit | 73cd74f8e7a9f2c7b6fe38c0b76179f89c363f37 (patch) | |
tree | e50271211591abb34e16bb9d7e4783aa69621d16 /gcc/fortran/expr.c | |
parent | 32c87d63d20a2fe4e5a510e058b5f5a6ebf82572 (diff) | |
download | gcc-73cd74f8e7a9f2c7b6fe38c0b76179f89c363f37.zip gcc-73cd74f8e7a9f2c7b6fe38c0b76179f89c363f37.tar.gz gcc-73cd74f8e7a9f2c7b6fe38c0b76179f89c363f37.tar.bz2 |
re PR fortran/49624 (ICE with pointer-bound remapping)
2011-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/49624
* expr.c (gfc_check_pointer_assign): Fix checking for invalid
pointer bounds.
2011-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/49624
* gfortran.dg/pointer_remapping_7.f90: New.
From-SVN: r176370
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 3bf1e94..b8eb555 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3286,7 +3286,8 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) upper bounds are present, we may do rank remapping. */ for (dim = 0; dim < ref->u.ar.dimen; ++dim) { - if (!ref->u.ar.start[dim]) + if (!ref->u.ar.start[dim] + || ref->u.ar.dimen_type[dim] != DIMEN_RANGE) { gfc_error ("Lower bound has to be present at %L", &lvalue->where); |