From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17886 invoked by alias); 5 Nov 2007 22:04:11 -0000 Received: (qmail 17858 invoked by uid 48); 5 Nov 2007 22:04:06 -0000 Date: Mon, 05 Nov 2007 22:04:00 -0000 Subject: [Bug fortran/33998] New: ICE in make_decl_rtl, at varasm.c:1263 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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: 2007-11/txt/msg00420.txt.bz2 Found at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/f222faf1eb571cba The following program crashes a couple of compilers, including gfortran 4.1.x to 4.3.0. The error message is: sdsd.f90: In function 'len_test': sdsd.f90:23: internal compiler error: in make_decl_rtl, at varasm.c:1263 This is the following assert: /* A weak alias has TREE_PUBLIC set but not the other bits. */ gcc_assert (TREE_CODE (decl) != VAR_DECL || TREE_STATIC (decl) || TREE_PUBLIC (decl) || DECL_EXTERNAL (decl) || DECL_REGISTER (decl)); * * * Using NAG f95, the following program compiles and prints "01234567890". module test implicit none contains function my_string(x) integer i real, intent(in) :: x(:) character(0) h4(1:minval([(1,i=1,0)],1)) character(0) sv1(size(x,1):size(h4)) character(0) sv2(2*lbound(sv1,1):size(h4)) character(lbound(sv2,1)-3) my_string do i = 1, len(my_string) my_string(i:i) = achar(modulo(i-1,10)+iachar('0')) end do end function my_string end module test program len_test use test implicit none real x(7) write(*,*) my_string(x) ! <<< Line 23 end program len_test -- Summary: ICE in make_decl_rtl, at varasm.c:1263 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33998