http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49708
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.07.12 12:27:33 Ever Confirmed|0 |1 --- Comment #2 from janus at gcc dot gnu.org 2011-07-12 12:27:33 UTC --- (In reply to comment #1) > In principle, the check is still in resolve.c - the question is: Why doesn't > it > trigger? Apparently because of the pointer attribute. Changing "pointer" to "allocatable" in the test case will trigger the error message. 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. */