http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46067

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org 2010-10-18 17:39:30 UTC ---
(In reply to comment #0)
> Compiling the attached module, with gfortran 4.6 trunk results in the 
> following
> error message:
> 
> ==============
> gfortran test_2.f90
> test_2.f90:6.52:
> 
>   procedure(fun_interface), pointer, pass :: fun_ptr
>                                                     1
> Error: Non-polymorphic passed-object dummy argument of 'fun_ptr' at (1)
> 
> ==============
> 
> potential problem 1 : the error message appears incorrect because the target 
> of
> the passed-object dummy argument isn't polymorphic.

No, the error message is perfectly fine. The Fortran 2008 standard clearly
demands:

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.


> potential problem 2: if the error message is correct and if the type of the
> passed-object dummy argument in the sample code is changed from a declaration
> of "type" to "class", the module compiles but hangs when the passed-object
> dummy argument is referenced. 

After changing the PASS arg from TYPE to CLASS, the module compiles fine for me
without any hanging (on x86_64-unknown-linux-gnu at r165600).

Reply via email to