------- Comment #2 from burnus at gcc dot gnu dot org 2010-07-21 16:32 -------
For completeness: In F2003, see Section 12.4.1.7 (3)(b) and in F95 see 12.4.1.6
(1)(c).
dependency.c's gfc_check_dependency is the place where a check needs to be
added. As pointerness is already checked, I think one can simply check for:
sym1 = expr1->symtree->n.sym;
sym2 = expr2->symtree->n.sym;
if (sym1.attr.target && sym2->attr.target
&& ((sym1->attr.dummy && !sym1->attr.contiguous
&& sym1->attr.dimension && sym2->as.type == AS_ASSUMED_SHAPE)
||(sym2->attr.dummy && !sym2->attr.contiguous
&& sym2->attr.dimension && sym2->as.type == AS_ASSUMED_SHAPE)
return 1;
Note: This is completely untested - neither compiled not thought about all
cases nor compiled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45019