ICE in gfc_conv_array_index_offset
Maik Beckmann
beckmann.maik@googlemail.com
Wed Feb 13 17:57:00 GMT 2008
Hello List,
I'm pretty new to fortran and don't know if the code below is even valid. Thus
to I'm posting this report to this list rather than adding it to via
bugzilla. Sorry for the inconvenience.
I'm want to port a bunch of code of my research group from intel to gfortran.
I've encountered an ICE. Several hours later I've reduced the code to
<foo.f90>
MODULE foo
TYPE, PUBLIC :: bar
PRIVATE
REAL :: value
END TYPE bar
INTERFACE ASSIGNMENT (=)
MODULE PROCEDURE assign_bar
END INTERFACE ASSIGNMENT (=)
CONTAINS
ELEMENTAL SUBROUTINE assign_bar (to, from)
TYPE(bar), INTENT(OUT) :: to
TYPE(bar), INTENT(IN) :: from
to%value= from%value
END SUBROUTINE
SUBROUTINE my_sub (in, out)
IMPLICIT NONE
TYPE(bar), DIMENSION(:,:), POINTER :: in
TYPE(bar), DIMENSION(:,:), POINTER :: out
ALLOCATE( out(1:42, 1:42) )
out(1, 1:42) = in(1, 1:42)
END SUBROUTINE
END MODULE foo
</foo.f90>
The compiler output is attached.
Is this code valid? If ELEMENTAL is omitted or replaced by PURE (I don't
really know the semantics of these keyword, google says they're about
parallelism) gfortran compiles fine.
Best,
-- Maik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compiler_output
Type: text/x-diff
Size: 767 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080213/7809a309/attachment.bin>
More information about the Fortran
mailing list