From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7219 invoked by alias); 19 Mar 2007 12:24:27 -0000 Received: (qmail 7194 invoked by uid 48); 19 Mar 2007 12:24:18 -0000 Date: Mon, 19 Mar 2007 12:24:00 -0000 Subject: [Bug fortran/31262] New: -fno-range-check can trigger ICE X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert 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-03/txt/msg01806.txt.bz2 $ cat uu.f90 print *, 7_8*huge(0_8)+17_8 end $ gfortran -static uu.f90 -fno-range-check uu.f90: In function ‘MAIN__’: uu.f90:1: internal compiler error: in gfc_conv_mpz_to_tree, at fortran/trans-const.c:183 There's an assertion in gfc_conv_mpz_to_tree: /* We assume that all numbers are in range for its type, and that we never create a type larger than 2*HWI, which is the largest that the middle-end can handle. */ It's wrong. Now that we have -fno-range-check, we should handle this in some way, probably by a modulo operation. -- Summary: -fno-range-check can trigger ICE Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fxcoudert at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31262