From patchwork Sun May 28 14:05:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 767892 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3wbM9J0cQtz9s7M for ; Mon, 29 May 2017 00:06:10 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mFbfBDsK"; dkim-atps=neutral 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=E0W6/JKMqiiegDL1TwX71UWdWI6JU78bNeGyOrpHsC0lXdyk9u O2atweGffK+bDgrsB4zajUOFPmbZIXepyXyCusUoonZH86OnYh2qocqcvnd3yeBd BYAP9hHssHeyytElGSCxgjrgwZOYqFuRFY8CwbwBGR5BxPaHl0R9KAjvg= 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=Xrhgh67tFWDkdYNfUDMaO4E3Xic=; b=mFbfBDsKyrYd67B1MSu5 ji4cve+T4tMkGI00q2m92Tr5b7ZMZRxUY44caRyc3aJUNUlColMwhVQeUW9Ka/CE HsbedlcV2a65Ty1K3VPC/HMSdvIZB0sbEopljB22do2TzWYrM/6o4dQ1QYx1j8Jr 7y7RiVz/MNtE9wDDLVovgIw= Received: (qmail 77423 invoked by alias); 28 May 2017 14:05:58 -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 77403 invoked by uid 89); 28 May 2017 14:05:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS 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; Sun, 28 May 2017 14:05:56 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 0248713205; Sun, 28 May 2017 16:05:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id F33EC11D73; Sun, 28 May 2017 16:05:55 +0200 (CEST) Received: from [78.35.140.144] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 592ad943-022c-7f0000012729-7f000001b61e-1 for ; Sun, 28 May 2017 16:05:55 +0200 Received: from [192.168.178.20] (xdsl-78-35-140-144.netcologne.de [78.35.140.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA; Sun, 28 May 2017 16:05:53 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix size of matmul calculation for a special case Message-ID: Date: Sun, 28 May 2017 16:05:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Hello world, I have just committed as obvious a patch fixing a wrong calculation for allocating the size of a return variable in inline matmul (PR 80904). I will backport to the other affected branches in the near future. Regards Thomas 2017-05-28 Thomas Koenig * frontend-passes.c (matmul_lhs_realloc): Correct allocation size for case A1B2. 2017-05-28 Thomas Koenig * gfortran.dg/matmul_bounds_12.f90: New test. Index: frontend-passes.c =================================================================== --- frontend-passes.c (Revision 248467) +++ frontend-passes.c (Arbeitskopie) @@ -2447,7 +2447,7 @@ matmul_lhs_realloc (gfc_expr *c, gfc_expr *a, gfc_ break; case A1B2: - ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, b, 1); + ar->start[0] = get_array_inq_function (GFC_ISYM_SIZE, b, 2); cond = build_logical_expr (INTRINSIC_NE, get_array_inq_function (GFC_ISYM_SIZE, c, 1), get_array_inq_function (GFC_ISYM_SIZE, b, 2));