Commit 73cd74f8 by Tobias Burnus Committed by Tobias Burnus

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
parent 32c87d63
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-16 Tobias Burnus <burnus@net-b.de>
* expr.c (gfc_ref_this_image): New function.
......
......@@ -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);
......
2011-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/49624
* gfortran.dg/pointer_remapping_7.f90: New.
2011-07-16 Jason Merrill <jason@redhat.com>
* lib/prune.exp (prune_gcc_output): Prune "In substitution" too.
......
! { dg-do compile }
!
! PR fortran/49624
!
integer, target :: A(100)
integer,pointer :: P(:,:)
p(10,1:) => A ! { dg-error "Lower bound has to be present" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment