------- Comment #3 from burnus at gcc dot gnu dot org 2010-04-09 08:42 ------- (In reply to comment #0) > Error: Passed-object dummy argument of 'error_read_formatted' at (1) must not > be POINTER
The error message itself is OK as the constraint is (F2008 FDIS): "C456 The passed-object dummy argument shall be a scalar, nonpointer, nonallocatable dummy data object with the same declared type as the type being defined; all of its length type parameters shall be assumed; it shall be polymorphic (4.3.1.3) if and only if the type being defined is extensible (4.5.7). It shall not have the VALUE attribute." However, if one looks at the object: type,extends(serializable_class)::error_type [...] contains procedure :: read_formatted => error_read_formatted [...] recursive subroutine error_read_formatted(dtv,unit,iotype,v_list,iostat,iomsg) CLASS(error_type),INTENT(INOUT) :: dtv The constraint seems to be fulfilled: "dtv" is a scalar, nonpointer, nonallocatable dummy. It does not have any length type parameters and it is not VALUE. And its type (well, class) is "error_type" as the type in which is it used - and CLASS is allows because "error_type" is extensible. The check itself in resolve.c also looks OK: me_arg->ts.u.derived->components->attr.class_pointer but it seems as if either the first component is checked (which would be is wrong) or as if the wrong type is used. One has: type,extends(serializable_class)::error_type class(error_type),pointer::next=>null() The component is polymorphic and of the same type and it is a POINTER; I assume that is the cause of the trouble. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43696