From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76817 invoked by alias); 30 Jan 2018 22:38:01 -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 76795 invoked by uid 89); 30 Jan 2018 22:38:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Jan 2018 22:37:59 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id B010312AD1; Tue, 30 Jan 2018 23:37:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id AC4C411DB5; Tue, 30 Jan 2018 23:37:56 +0100 (CET) Received: from [78.35.141.138] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 5a70f3c4-029d-7f0000012729-7f000001b657-1 for ; Tue, 30 Jan 2018 23:37:56 +0100 Received: from [192.168.178.20] (xdsl-78-35-141-138.netcologne.de [78.35.141.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Tue, 30 Jan 2018 23:37:55 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix PR 84134 Message-ID: Date: Tue, 30 Jan 2018 22:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------34A7AD3CC6BF4BFAD9855461" X-SW-Source: 2018-01/txt/msg00228.txt.bz2 This is a multi-part message in MIME format. --------------34A7AD3CC6BF4BFAD9855461 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 389 Hello world, another obvious fix, this time for an ice-on-invalid regression, committed after regression-testing. Regards Thomas 2017-01-30 Thomas Koenig PR fortran/84134 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is zero, return false. 2017-01-30 Thomas Koenig PR fortran/84134 --------------34A7AD3CC6BF4BFAD9855461 Content-Type: text/x-patch; name="p1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p1.diff" Content-length: 594 Index: array.c =================================================================== --- array.c (Revision 257131) +++ array.c (Arbeitskopie) @@ -2245,9 +2245,12 @@ gfc_ref_dimen_size (gfc_array_ref *ar, int dimen, else { stride_expr = gfc_copy_expr(ar->stride[dimen]); + if(!gfc_simplify_expr(stride_expr, 1)) gfc_internal_error("Simplification error"); - if (stride_expr->expr_type != EXPR_CONSTANT) + + if (stride_expr->expr_type != EXPR_CONSTANT + || mpz_cmp_ui (stride_expr->value.integer, 0) == 0) { mpz_clear (stride); return false; --------------34A7AD3CC6BF4BFAD9855461 Content-Type: text/x-fortran; name="data_implied_do_2.f90" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="data_implied_do_2.f90" Content-length: 209 ! { dg-do compile } ! PR fortran/84134 - this used to ICE. ! Test case by Gerhard Steinmetz program p integer :: i, x(3) data (x(i+1:i+2:i),i=0,1) /1,2,3/ ! { dg-error "Nonconstant array section" } end --------------34A7AD3CC6BF4BFAD9855461--