kargl[408] gfortran -c z.f90 z.f90: In function `x': z.f90:9: internal compiler error: in make_decl_rtl, at varasm.c:758 Environment: System: FreeBSD c-67-168-59-70.client.comcast.net 5.2-CURRENT FreeBSD 5.2-CURRENT #6: Sun Jul 11 10:10:47 PDT 2004 kargl@c-67-168-59-70.client.comcast.net:/usr/obj/usr/src/sys/HOTRATS i386 host: i386-unknown-freebsd5.2 build: i386-unknown-freebsd5.2 target: i386-unknown-freebsd5.2 configured with: ../gcc/configure --prefix=/home/kargl/gcc/work --disable-libmudflap --enable-languages=c,f95 : (reconfigured) ../gcc/configure --prefix=/home/kargl/gcc/work --disable-libmudflap --with-gcc-version-trigger=/home/kargl/gcc/gcc/gcc/version.c --enable-languages=c,f95 --no-create --no-recursion How-To-Repeat: Try to compile MODULE Z DOUBLE PRECISION, PRIVATE, PARAMETER :: RBX = 1.D0 DOUBLE PRECISION, ALLOCATABLE, PRIVATE:: DD1(:) CONTAINS SUBROUTINE X ALLOCATE (DD1(2)) DO I = 1, 2 DD1(I) = INT(RBX) END DO END SUBROUTINE X END MODULE Z with gfortran.
Confirmed, related to PR 15955.
Here's an even shorter testcase: =============================================== module FOO integer, private :: I contains subroutine BAR I=1 end subroutine BAR end module FOO ===============================================
*** Bug 16944 has been marked as a duplicate of this bug. ***
*** Bug 15955 has been marked as a duplicate of this bug. ***
A patch which fixes this is here: http://gcc.gnu.org/ml/fortran/2004-09/msg00019.html
Fixed.