From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30312 invoked by alias); 28 Nov 2012 00:27:49 -0000 Received: (qmail 30237 invoked by uid 48); 28 Nov 2012 00:27:33 -0000 From: "longb at cray dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55501] New: ICE using MERGE in constant expr Date: Wed, 28 Nov 2012 00:27: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: longb at cray dot com 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-11/txt/msg02617.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55501 Bug #: 55501 Summary: ICE using MERGE in constant expr Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: longb@cray.com Test (extracted from a larger module) > cat test2.f90 module test integer,parameter,private :: int32 = 4 integer,private,parameter :: dik = kind(0) ! Default Integer Kind type MPI_Datatype integer :: mpi_val end type type(MPI_Datatype),parameter,private :: MPIx_I4 = MPI_Datatype(4) type(MPI_Datatype),parameter,private :: MPIx_I8 = MPI_Datatype(8) type(MPI_Datatype),parameter :: MPI_INTEGER = merge(MPIx_I4, MPIx_I8, dik==int32) end module test > ftn -c test2.f90 f951: internal compiler error: in gfc_conv_structure, at fortran/trans-expr.c:5360 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Also fails with 4.8. Allowing MERGE here is a F2003 feature (elemental intrinsic with constant arguments). In any case, the compiler should not abort. Compiles OK with Cray compiler.