From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20671 invoked by alias); 2 Jun 2009 09:29:13 -0000 Received: (qmail 20629 invoked by uid 48); 2 Jun 2009 09:29:01 -0000 Date: Tue, 02 Jun 2009 09:29:00 -0000 Message-ID: <20090602092901.20628.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40011] Problems with -fwhole-file In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominiq at lps dot ens dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00061.txt.bz2 ------- Comment #31 from dominiq at lps dot ens dot fr 2009-06-02 09:29 ------- With the patch in comment #28, I have a dozen new ICEs in my test suite. They seems to be in two classes: [ibook-dhum] f90/bug% cat pr33295.f90 module A type A_type real comp end type end module A module B contains function initA() use A implicit none type(A_type):: initA initA%comp=1.0 end function end module B program C use B use A implicit none type(A_type):: A_var A_var = initA() end program C [ibook-dhum] f90/bug% gfc pr33295.f90 pr33295.f90: In function 'c': pr33295.f90:24: internal compiler error: in fold_convert, at fold-const.c:2687 and [ibook-dhum] f90/bug% cat test_point.f90 module global type :: mytype type(mytype),pointer :: this end type mytype type(mytype),target :: base end module global program test_equi use global call check() print *, "base%this%this=>base?" , associated(base%this%this,base) print *, "base%this%this=>?" , associated(base%this%this) print *, "base%this=>?" , associated(base%this) contains subroutine check() type(mytype),target :: j base%this => j !have the variables point j%this => base !to one another end subroutine check !take j out of scope end program test_equi [ibook-dhum] f90/bug% gfc test_point.f90 gfc: Internal error: Segmentation fault (program f951) Concerning gfortran.dg/default_initialization_3.f90, I cannot say if the problem is with the front-end or the middle-end, but it is certainly tricky to do the correct inlining. I think the problem should go to another pr. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011