ICE on intent(out) dummy argument with unlimited polymorphic component

Damian Rouson damian@rouson.net
Thu Jan 3 03:01:00 GMT 2013


P.S. I just submitted this as PR 55854:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55854.

On Wed, Jan 2, 2013 at 9:53 PM, Damian Rouson <damian@rouson.net> wrote:
> As demonstrated below, having an "intent(out)" dummy argument with an
> unlimited polymorphic component generates an internal compiler error
> with a December 23 build of gfortran 4.8:
>
> $ cat ice_on_intent_out_with_unlimted.f90
>   type foo
>     class(*), allocatable :: x
>   end type
> contains
>   subroutine bar(this)
>     type(foo), intent(out) :: this
>   end
> end
> $ gfortran ice_on_intent_out_with_unlimted.f90
> ice_on_intent_out_with_unlimted.f90: In function 'bar':
> ice_on_intent_out_with_unlimted.f90:5:0: internal compiler error:
> Segmentation fault: 11
>    subroutine bar(this)
>  ^
>
> ice_on_intent_out_with_unlimted.f90:5:0: internal compiler error: Abort trap: 6
> gfortran: internal compiler error: Abort trap: 6 (program f951)
> Abort trap: 6
> $ gfortran --version
> GNU Fortran (MacPorts gcc48 4.8-20121223_0) 4.8.0 20121223 (experimental)
>
>
> Damian



More information about the Fortran mailing list