From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103773 invoked by alias); 14 Nov 2015 21:21:20 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 103764 invoked by uid 89); 14 Nov 2015 21:21:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nef2.ens.fr Received: from nef2.ens.fr (HELO nef2.ens.fr) (129.199.96.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Nov 2015 21:21:19 +0000 Received: from mailhost.lps.ens.fr (tournesol.lps.ens.fr [129.199.120.1]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id tAELLGUa038222 for ; Sat, 14 Nov 2015 22:21:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mailhost.lps.ens.fr (Postfix) with ESMTP id 69989228 for ; Sat, 14 Nov 2015 22:21:16 +0100 (CET) Received: from mailhost.lps.ens.fr ([127.0.0.1]) by localhost (tournesol.lps.ens.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w5olAJORHC55 for ; Sat, 14 Nov 2015 22:21:16 +0100 (CET) Received: from [192.168.1.14] (log78-1-82-242-47-10.fbx.proxad.net [82.242.47.10]) by mailhost.lps.ens.fr (Postfix) with ESMTPSA id 44694226 for ; Sat, 14 Nov 2015 22:21:16 +0100 (CET) From: =?utf-8?Q?Dominique_d=27Humi=C3=A8res?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [RFC] Hack for PRs 43996,45081, 58027, 59910, and 60993 Message-Id: <65FD2119-0F31-4B31-96F8-0DC84E5E698A@lps.ens.fr> Date: Sat, 14 Nov 2015 21:21:00 -0000 To: fortran@gcc.gnu.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-SW-Source: 2015-11/txt/msg00080.txt.bz2 Compiling PRs 43996,45081, 58027, 59910, and 60993 gives the ICE internal compiler error: in gfc_conv_array_initializer, at fortran/trans-ar= ray.c:5703 Compiling these PRs with '-fno-range-check -fmax-array-constructor=3D10000= 00' succeeds except PR45081 (note that the output for pr 60993 does not see= m to be the one expected by the reporter). I have played with the following patch which gives the error Fatal Error: A problem with BOZ and/or PARAMETER occurred at (1), try to co= mpile with -fnorange-check and/or to increase the allowed 65535 upper limit= for the '-fmax-array-constructor=E2=80=99 option Is there a (simple) way to distinguish between the cases compiling with -fn= orange-check and those requiring an increase of the default value for -fmax= -array-constructor? Indeed I know that the problem should be fixed upstream, but would it be ac= ceptable to apply this kind of patch meanwhile? Cheers, Dominique --- ../_clean/gcc/fortran/trans-array.c 2015-11-11 15:23:35.000000000 +0100 +++ gcc/fortran/trans-array.c 2015-11-14 22:02:20.000000000 +0100 @@ -5699,7 +5699,21 @@ gfc_conv_array_initializer (tree type, g case EXPR_NULL: return gfc_build_null_descriptor (type); =20 + case EXPR_FUNCTION: + /* Problems occur when we get something like + integer :: a(lots) =3D (/(i, i=3D1, lots)/) */ + gfc_fatal_error ("A problem with BOZ and/or PARAMETER occurred " + "at %L, try to compile with -fnorange-check and/or " + "to increase the allowed %d upper limit for the " + "%<-fmax-array-constructor%> option", + &expr->where, flag_max_array_constructor); + return NULL_TREE; + /* int errors; + gfc_get_errors (NULL, &errors); + gfc_fatal_error ("Something wrong: errors count is %d", errors); */ + default: + printf ("expr->expr_type is %d\n", expr->expr_type); gcc_unreachable (); } =20