Symptom:
$ gfortran -c test.F90
test.F90: In function 'MAIN__':
test.F90:24: internal compiler error: in gfc_trans_call, at
fortran/trans-stmt.c:325
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Version:
$ gfortran -v
Using built-in specs.
Target: i386-linux
Configured with: ../gcc/configure
--prefix=/cosmic/coudert/tmp/gfortran-20060906/irun
--enable-languages=c,fortran
--host=i386-linux
--with-gmp=/cosmic/coudert/tmp/gfortran-20060906/gfortran_libs
Thread model: posix
gcc version 4.2.0 20060904 (experimental)
Code enclosed (cut down as much as possible)
MODULE MAT
TYPE BAS
INTEGER :: R = 0,C = 0
END TYPE BAS
TYPE BLOCK
INTEGER, DIMENSION(:), POINTER :: R,C
TYPE(BAS), POINTER, DIMENSION(:) :: NO => NULL()
END TYPE BLOCK
INTERFACE ASSIGNMENT(=)
MODULE PROCEDURE BLASSIGN
END INTERFACE
CONTAINS
SUBROUTINE BLASSIGN(A,B)
TYPE(BLOCK), INTENT(IN) :: B
TYPE(BLOCK), INTENT(INOUT) :: A
INTEGER I,N
! ...
END SUBROUTINE BLASSIGN
END MODULE MAT
PROGRAM TEST
USE MAT
TYPE(BLOCK) MATRIX
POINTER MATRIX
ALLOCATE(MATRIX)
END
--
Summary: allocation of a pointer to a derived type crashes
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vahtras at pdc dot kth dot se
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29098