From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18276 invoked by alias); 8 Jul 2007 22:41:05 -0000 Received: (qmail 18211 invoked by uid 48); 8 Jul 2007 22:40:55 -0000 Date: Sun, 08 Jul 2007 22:41:00 -0000 Subject: [Bug fortran/32682] New: [4.3 Regression] ICE in gfc_trans_array_constructor, at fortran/trans-array.c:1664 X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jaydub66 at gmail dot com" 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-07/txt/msg00985.txt.bz2 consider the following program: program matrix implicit none real,dimension(2,2),parameter::c=0 real,dimension(2,2)::m m=f()+c m=c+f() call sub(m+f()) call sub(c+m) call sub(f()+c) call sub(c+f()) contains function f() implicit none real, dimension(2,2)::f f=0 end function f subroutine sub(a) implicit none real, dimension(2,2)::a end subroutine sub end program matrix this gives the error message: matrix.f90: In function ‘MAIN__’: matrix.f90:11: internal compiler error: in gfc_trans_array_constructor, at fortran/trans-array.c:1664 though the message claims an error in line 11, the program only fails in the presence of line 12: "call sub(c+f())" all the lines before (7-11) are ok. the ICE only appears in exactly this configuration, i.e. c is a parameter, f is a function, and c+f() is fed as an argument to a subroutine it happens in trans-array.c(gfc_trans_array_constructor), line 1664: /* We should have a 1-dimensional, zero-based loop. */ gcc_assert (loop->dimen == 1); this fails with loop->dimen==2 in our case happens only with 4.3 (trunk), but not with 4.1 or 4.2 -- Summary: [4.3 Regression] ICE in gfc_trans_array_constructor, at fortran/trans-array.c:1664 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jaydub66 at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32682