This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48800] [4.6/4.7 Regression] ICE with non-allocatable/pointer deferred-shape array
- 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: Thu, 28 Apr 2011 12:04:37 +0000
- Subject: [Bug fortran/48800] [4.6/4.7 Regression] ICE with non-allocatable/pointer deferred-shape array
- Auto-submitted: auto-generated
- References: <bug-48800-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48800
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-28 12:03:42 UTC ---
(In reply to comment #0)
> real :: dr(4)
s/dr(4)/dr(:)/ to reproduce the ICE.
If one places a break point in resolve_fl_var_and_proc, one sees that for
sym->name == "dr", the type is: sym->as->type == AS_ASSUMED_SHAPE -- rather
than the expected AS_DEFERRED_SHAPE. If it had the latter, a proper error
message would have been printed.
My impression is that the problem occurs because "dr" is also a dummy argument;
the change from AS_DEFERRED_SHAPE to AS_ASSUMED_SHAPE is done at
resolve_formal_arglist for dummy arguments. Maybe one should check for
attr.flavor != FL_PROCEDURE before doing the change.