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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|[4.5/4.6/4.7 Regression]    |[4.5/4.6/4.7 Regression]
                   |[F03] ICE on invalid with   |[F03] ICE with PROCEDURE
                   |procedure interface         |statement

--- Comment #7 from janus at gcc dot gnu.org 2011-10-08 10:49:38 UTC ---
(In reply to comment #4)
> I'm still not completely sure if the test case is valid or not. I could not
> find anything in the standard which forbids it, so I'm assuming it is valid 
> for
> now.

For what it's worth, the test case in comment #2 is accepted by g95, PGI and
PathScale.

It is rejected by ifort with:

error #8169: The specified interface is not declared.   [PROC]
  procedure(Proc) :: Proc_Get
------------^

To my understanding, this is a bug in ifort. However, ifort does accept the
following variant (which also ICEs with gfortran):


module m
  integer :: arrSize
end module

module m2
contains
  function Proc (arg)
    use m
    double precision, dimension(arrSize) :: proc
    double precision :: arg
  end function
end

program p
  use m2
  implicit none
  procedure(Proc) :: Proc_Get
end


In summary, this test case is accepted by ifort, g95, PGI and PathScale, which
I think is strong empirical evidence that it is valid (though it's not a proof,
of course). I don't have access to any other compiler which supports PROCEDURE
statements.

Unless anyone can show me a restriction in the standard which makes it illegal,
I'll continue to assume that this is an ICE-on-valid bug (which makes it even
more severe).

Reply via email to