http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46990
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-18 17:08:49 UTC --- (In reply to comment #5) > The patch in comment #4 triggers two testsuite failures: > > FAIL: gfortran.dg/dummy_procedure_4.f90 -O (test for errors, line 28) > FAIL: gfortran.dg/proc_ptr_30.f90 -O (test for errors, line 25) > > Both of them come from PR46067. I think they are actually valid Fortran and > it's wrong to expect an error message. I disagree. The first is about passing a procedure to a procedure dummy argument, the second about associating a procedure with a proc-pointer - both require that the characteristic is the same: "7.2.2.4 Procedure pointer assignment" "If the pointer object has an explicit interface, its characteristics shall be the same as the pointer target except that the pointer target may be pure even if the pointer object is not pure and the pointer target may be an elemental intrinsic procedure even if the pointer object is not elemental. If the characteristics of the pointer object or the pointer target are such that an explicit interface is required, both the pointer object and the pointer target shall have an explicit interface." "12.5.2.9 Actual arguments associated with dummy procedure entities" "If the interface of a dummy procedure is explicit, its characteristics as a procedure (12.3.1) shall be the same as those of its eective argument, except that a pure eective argument may be associated with a dummy argument that is not pure and an elemental intrinsic actual procedure may be associated with a dummy procedure (which cannot be elemental)." Compare this with (cf. comment 0): "The dummy argument shall be type compatible with the actual argument." -- which is less strict.