Bug 16609 - ICE with "private": in make_decl_rtl, at varasm.c:758
Summary: ICE with "private": in make_decl_rtl, at varasm.c:758
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored, patch
: 15955 16944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-17 19:36 UTC by kargl@c-67-168-59-70.client.comcast.net
Modified: 2004-11-06 15:43 UTC (History)
5 users (show)

See Also:
Host: i386-unknown-freebsd5.2
Target: i386-unknown-freebsd5.2
Build: i386-unknown-freebsd5.2
Known to work:
Known to fail:
Last reconfirmed: 2004-07-17 22:38:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kargl@c-67-168-59-70.client.comcast.net 2004-07-17 19:36:55 UTC

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.
Comment 1 Andrew Pinski 2004-07-17 22:38:19 UTC
Confirmed, related to PR 15955.
Comment 2 Volker Reichelt 2004-08-09 16:06:59 UTC
Here's an even shorter testcase:

===============================================
module FOO
    integer, private :: I
    contains
        subroutine BAR
            I=1
        end subroutine BAR
end module FOO
===============================================
Comment 3 Volker Reichelt 2004-08-09 16:12:11 UTC
*** Bug 16944 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2004-08-09 16:16:02 UTC
*** Bug 15955 has been marked as a duplicate of this bug. ***
Comment 5 Tobias Schlüter 2004-09-02 10:50:33 UTC
A patch which fixes this is here:
http://gcc.gnu.org/ml/fortran/2004-09/msg00019.html
Comment 6 Paul Brook 2004-09-15 13:17:22 UTC
Fixed.