From patchwork Tue Jan 30 20:51:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 867669 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-472315-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="XhAcm0Pf"; 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 3zWJTN1zpSz9sNw for ; Wed, 31 Jan 2018 07:51:50 +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=CEkI29wA1i0SQj0jrfXtJfREmygXtJqC59GmwCM2/blC5tLtC8 j0WQZM05cNpktj3qz7+sLzoKEss4qzK8/nshAt2ocdjFoJLXFy+Ut45oubhBSvM9 hR+aLDw2vlaT1BmZhtJ32DJtVYBr/1Mjh7cah3aLbI/sOX8Nths6m1gVM= 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=aRthjEjLdAXVYmRWw+AWRzvPT6Y=; b=XhAcm0PfS/hdm3tJTHjK GCPt4rtH1fEpcXe341Sx5u2VTF2uS/41X9u+mhKnj96b5iiXH8aIUgFZqAPAzqzg v+l4fCvRndICvmuGgpTREXTKUJGRcjTwRwpP2TOe55lDHcr2nvK3M5vOkI6lG+KV 5U48fHWg/RlF/7iUnB54b3o= Received: (qmail 39458 invoked by alias); 30 Jan 2018 20:51:42 -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 39412 invoked by uid 89); 30 Jan 2018 20:51:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, 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-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Jan 2018 20:51:39 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id EE12F13651; Tue, 30 Jan 2018 21:51:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id E6C5711DB9; Tue, 30 Jan 2018 21:51:36 +0100 (CET) Received: from [78.35.141.138] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 5a70dad8-02b7-7f0000012729-7f00000199a8-1 for ; Tue, 30 Jan 2018 21:51:36 +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-smtpin3.netcologne.de (Postfix) with ESMTPSA; Tue, 30 Jan 2018 21:51:35 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix PR 84133, regression with matmul Message-ID: <0d8d79cd-8ea5-b680-7b43-1cc04316c9b8@netcologne.de> Date: Tue, 30 Jan 2018 21:51:35 +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, I have just committed the attached patch as obvious, after regtesting. Regards Thomas 2018-01-30 Thomas Koenig PR fortran/84133 * frontend-passes (matmul_to_var_expr): Return early if in association list. (inline_matmul_assign): Likewise. 2018-01-30 Thomas Koenig PR fortran/84133 * gfortran.dg/inline_matmul_21.f90: New test case. Index: frontend-passes.c =================================================================== --- frontend-passes.c (Revision 257131) +++ frontend-passes.c (Arbeitskopie) @@ -2763,7 +2763,7 @@ matmul_to_var_expr (gfc_expr **ep, int *walk_subtr return 0; if (forall_level > 0 || iterator_level > 0 || in_omp_workshare - || in_where) + || in_where || in_assoc_list) return 0; /* Check if this is already in the form c = matmul(a,b). */ @@ -3728,7 +3728,7 @@ inline_matmul_assign (gfc_code **c, int *walk_subt if (co->op != EXEC_ASSIGN) return 0; - if (in_where) + if (in_where || in_assoc_list) return 0; /* The BLOCKS generated for the temporary variables and FORALL don't