http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60701
Bug ID: 60701 Summary: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:551 Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: peter.machon at arcor dot de Created attachment 32478 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32478&action=edit called by main program .... just some matrix definitions. The attached code produces the following error code: test.f90: In function 'test': test.f90:84:0: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:551 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. If gf in the function g(x,e) is not an array but a scalar, it's compiling and running without an issue. System: Mac OSX 10.6.8 Best, Peter PS.: I saw a similar report (43896). So I'm sorry, in case, the issue is already solved in a never version of gfortran. Source: module test_mod implicit none type terminal character(len=1) :: typ real(8) :: d contains procedure,pass :: g end type type(terminal),dimension(1:2) :: t contains function g(x,e) result(gf) use pauli class(terminal),intent(inout) :: x real(8),intent(in) :: e complex(8),dimension(1:2,1:2) :: gf select case (x%typ) case('N') gf=sigma_3 case('S') gf=e*sigma_3+x%d*sigma_1 end select end function end module program test use test_mod implicit none t(1)%typ='N' t(2)%typ='S' t(2)%d=3d0 write(*,*)t(1)%g(2d0) write(*,*)t(2)%g(2d0) end program