http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47569
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-03 07:46:17 UTC --- (In reply to comment #4) > I am guessing but I suppose ultimate pointer components should be included > too? Yes, however, "gfc_expr_attr (actual).pointer" does not work as "foo(1)" is never a pointer (even if "foo" is one). Thus, one needs to do something like: pointer = sym->n.sym->attr.pointer and update it every time one accesses a component ref. (I have not thought about pointer-returning functions, but one should not confuse them with proc-pointer functions.) > This raises a point, however. Relative to the message, the error seems to do a > lot more :-) I feel a lunchtime peruse of the F2003 standard coming on. I have in my incomplete draft patch also the following bits, which should be included in the final patch: - is valid (cf. F95 12.4.1.1; F2003 12.4.1.2), + is valid (cf. F95 12.4.1.1, F2003 12.4.1.2, F2008 12.5.2.4), and - gfc_error ("Element of assumed-shaped array passed to dummy " - "argument '%s' at %L", formal->name, &actual->where); + gfc_error ("Element of assumed-shaped or pointer array passed to " + "dummy argument '%s' at %L", formal->name, &actual->where);