------- Comment #1 from burnus at gcc dot gnu dot org 2010-06-16 12:21 ------- The following check is to simplistic, it does not work for structures but only for simple object names. - with structures, it gets more complicated as also comparing the name of the last part-ref won't work - but one needs to walk through the whole structure references.
Alternatively, one disables the check "if (stat->symtree->n.sym->ts.type != BT_INTEGER)" - that's maybe too simple, but it would fix this problem. (Maybe that's _the_ solution for the 4.5 branch?) [When using stat=foo%array(1), NAG, pgf95, and g95 do not print a warning/error, but ifort, openf95, pathf95, sunf95, and Cray print an error.] In resolve.c's resolve_allocate_deallocate: for (p = code->ext.alloc.list; p; p = p->next) if (p->expr->symtree->n.sym->name == stat->symtree->n.sym->name) gfc_error ("Stat-variable at %L shall not be %sd within " "the same %s statement", &stat->where, fcn, fcn); -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC host triplet|x86_64-linux-gnu | GCC target triplet|x86_64-linux-gnu | Keywords| |rejects-valid Known to fail| |4.5.1 4.6.0 Known to work| |4.4.0 Last reconfirmed|0000-00-00 00:00:00 |2010-06-16 12:21:06 date| | Summary|incorrect error: Stat- |[4.5/4.6 Regression] |variable at (1) shall not be|incorrect error: Stat- |DEALLOCATEd within the same |variable at (1) shall not be |DEALLOCATE statement |DEALLOCATEd within the same | |DEALLOCATE statement Target Milestone|--- |4.5.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44556