From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24443 invoked by alias); 7 Oct 2012 21:40:12 -0000 Received: (qmail 24272 invoked by uid 48); 7 Oct 2012 21:39:57 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54851] New: Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE Date: Sun, 07 Oct 2012 21:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-10/txt/msg00625.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54851 Bug #: 54851 Summary: Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives an ICE Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: dominiq@lps.ens.fr Compiling gfortran.dg/class_array_7.f03 with '-O1 -flto' gives In file included from :0:0: /opt/gcc/_clean/gcc/testsuite/gfortran.dg/class_array_7.f03: In function 'main': /opt/gcc/_clean/gcc/testsuite/gfortran.dg/class_array_7.f03:49:0: internal compiler error: in fold_convert_loc, at fold-const.c:1979 use realloc ^ Reduced test case module realloc implicit none type :: base_type integer :: i end type base_type contains character(20) function print_type (name, a) character(*), intent(in) :: name class(base_type), dimension(:), intent(in) :: a select type (a) type is (base_type); print_type = NAME // " is base_type" end select end function end module realloc program main use realloc implicit none class(base_type), dimension(:), allocatable :: a allocate (base_type :: a(10)) if (trim (print_type ("a", a)) .ne. "a is base_type") call abort end program main