Current trunk (as well as the whole 4.2 branch, it seems), ICEs on the
following invalid code:
module foo
type bar
logical, pointer, dimension(:) :: baz
end type
contains
function func1()
type(bar) func1
allocate(func1%baz(1))
end function
function func2()
type(bar) func2
allocate(func1%baz(1))
end function
end module foo
~/tmp>gfortran -v bug.f90
Driving: gfortran -v bug.f90 -lgfortranbegin -lgfortran -lm -shared-libgcc
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /scratch/martin/gcc/configure
--prefix=/afs/mpa/data/martin/ugcc --with-mpfr-include=/usr/include
--with-mpfr-lib=/usr/lib --enable-languages=c++,fortran
--enable-checking=release
Thread model: posix
gcc version 4.3.0 20080108 (experimental) [trunk revision 131394] (GCC)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic'
/afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 bug.f90
-quiet -dumpbase bug.f90 -mtune=generic -auxbase bug -version
-fintrinsic-modules-path
/afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude -o
/tmp/ccOrwEru.s
GNU F95 (GCC) version 4.3.0 20080108 (experimental) [trunk revision 131394]
(i686-pc-linux-gnu)
compiled by GNU C version 4.3.0 20080108 (experimental) [trunk revision
131394], GMP version 4.2.1, MPFR version 2.3.0.
warning: GMP header version 4.2.1 differs from library version 4.2.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
bug.f90: In function 'func2':
bug.f90:8: internal compiler error: in gfc_conv_descriptor_dtype, at
fortran/trans-array.c:224
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE-on-invalid in gfc_conv_descriptor_dtype
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at mpa-garching dot mpg dot de
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=34714