From patchwork Tue Jan 30 22:37:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 867706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472322-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kbzoWiBi"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zWLr202WZz9sNc for ; Wed, 31 Jan 2018 09:38:09 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=mGm5w+pziolDl6n8eYhVFxD+sRJmk0CEDeHxV4gGkMFMZ7bHA6 YkAX4cMmxhTJ2vL7k/D9vUox5TEJesNCUpVDZW68yMaLqdGgdiLushl/gIalw2sq zZvImozp22IA+uTVtyBfijiq15plIsyAcTvj6bcKvYcF+xPCxwL+cVnIQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=3eSDzcrxJGL21kVuALfrjRUen9g=; b=kbzoWiBidKiVnmiOUiO9 NVzK6eArGcDL7tWb3+TxA+2HQ5BpKV2O37ivgA9k5XUWLCfBtS4o+NqaeM7Ystu4 Sd0fi+n8TdNLS07Pr3XMKJrvutpcKjjcYNTYhynPYekibMtMF4ZZfH9Cgv21/d6R ClNL1LmnEX2WlzQqKIBI/tI= Received: (qmail 76818 invoked by alias); 30 Jan 2018 22:38:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 23:37:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 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 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;