This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49624] ICE with pointer-bound remapping
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Jul 2011 15:31:32 +0000
- Subject: [Bug fortran/49624] ICE with pointer-bound remapping
- Auto-submitted: auto-generated
- References: <bug-49624-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49624
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-15 15:31:05 UTC ---
(In reply to comment #0)
> p(10,1:) => A
The problem is that "10" is parsed as DIMEN_ELEMENT such that ar.start is set
and ar.end is not. Thus, for the resolver, it is regarded as (10:,1:).
Patch:
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3286,7 +3286,7 @@ 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);