This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49708] [4.5/4.6/4.7 Regression] ICE with allocate and no dimensions
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jul 2011 14:45:12 +0000
- Subject: [Bug fortran/49708] [4.5/4.6/4.7 Regression] ICE with allocate and no dimensions
- Auto-submitted: auto-generated
- References: <bug-49708-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49708
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #4 from janus at gcc dot gnu.org 2011-07-12 14:44:30 UTC ---
(In reply to comment #2)
> With the following patch one also gets the error message for the pointer case,
> but I haven't checked if this breaks anything else:
>
>
> Index: gcc/fortran/resolve.c
> ===================================================================
> --- gcc/fortran/resolve.c (revision 175788)
> +++ gcc/fortran/resolve.c (working copy)
> @@ -6884,7 +6884,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code
> gfc_find_derived_vtab (ts.u.derived);
> }
>
> - if (pointer || (dimension == 0 && codimension == 0))
> + if (dimension == 0 && codimension == 0)
> goto success;
>
> /* Make sure the last reference node is an array specifiction. */
I just verified that this patch is free of testsuite regressions.