From patchwork Sat Jan 20 06:17:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Kargl X-Patchwork-Id: 863926 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-471723-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="yz6VS1k1"; 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 3zNnY60YD9z9s1h for ; Sat, 20 Jan 2018 17:17:27 +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:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=MNHpyUk+7pLzTJ8mRqyhklpw/+lVDekpc9xBvmbRsXL +mo8ekUjMMmsCsQGr1zIYpubr4NlDdykP/8Sj1l2D3H0XnYR0NOG77K8jFU0an2o YJ7eECqMaHijTeQPlyjKfGeZ3DjigMCuum0mU37VCtSsRnFaP1yKioYNeW9L4T+g = 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:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=SODtlMMfFER3DVxNq0Tk1tq7E5Q=; b=yz6VS1k1CBOUYmOhn IjXUW8vXslNVHXjJYOKuQVzQUaJxZAPnprF3Sv9iTiV2ZpFKgsvjwaOk1o3fWnTc dzZqG52D+ch5IfwAw6lYK2hew9ACmiRrPs5Q05H9fhC0UFe5XoQbAItvN5JcwJ0R S0iL0tX6vztFwyvQT2uvqd6QFs= Received: (qmail 110592 invoked by alias); 20 Jan 2018 06:17:20 -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 110568 invoked by uid 89); 20 Jan 2018 06:17:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 20 Jan 2018 06:17:18 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id w0K6HGrq022312 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 19 Jan 2018 22:17:16 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id w0K6HGJR022311; Fri, 19 Jan 2018 22:17:16 -0800 (PST) (envelope-from sgk) Date: Fri, 19 Jan 2018 22:17:16 -0800 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [Committed] PR fortran/83900 -- Remove bogus assert Message-ID: <20180120061716.GA22278@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) The patch and testcase are sufficient to describe the problem. 2018-01-19 Steven G. Kargl PR fortran/83900 * simplify.c (gfc_simplify_matmul): Delete bogus assertion. 2018-01-19 Steven G. Kargl PR fortran/83900 * gfortran.dg/matmul_17.f90: New test. Index: gcc/fortran/simplify.c =================================================================== --- gcc/fortran/simplify.c (revision 256905) +++ gcc/fortran/simplify.c (working copy) @@ -4590,7 +4590,6 @@ gfc_simplify_matmul (gfc_expr *matrix_a, gfc_expr *mat || !is_constant_array_expr (matrix_b)) return NULL; - gcc_assert (gfc_compare_types (&matrix_a->ts, &matrix_b->ts)); result = gfc_get_array_expr (matrix_a->ts.type, matrix_a->ts.kind, &matrix_a->where); Index: gcc/testsuite/gfortran.dg/matmul_17.f90 =================================================================== --- gcc/testsuite/gfortran.dg/matmul_17.f90 (nonexistent) +++ gcc/testsuite/gfortran.dg/matmul_17.f90 (working copy) @@ -0,0 +1,9 @@ +! { dg-do run } +! PR Fortran/83900 +! Contributed by Gerhard Steinmetz +program p + integer, parameter :: a(3,2) = 1 + real, parameter :: b(2,3) = 2 + real, parameter :: c(3,3) = matmul(a, b) + if (any(c /= 4.)) call abort +end