From patchwork Wed Dec 26 21:14:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Kargl X-Patchwork-Id: 1018740 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-493116-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=troutmask.apl.washington.edu Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="OXMLmJ4O"; 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 43Q5MV72qRz9s3l for ; Thu, 27 Dec 2018 08:14:43 +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=exP+p4m9PRIRAodXVcDfShqGdBVIcBECxxVJNQ12kAx VO/U/h/VteQ3i+Fcq45q21h0coHeeiqFfwdH9qj5aVsCeRB55TtM/yetNd8bDLvi 2UGUVmD5noXhdw1KHpq+YMChGG+Mz4i0DcB1XIAT/4QP6TcVOU38A68WECmJ7vGs = 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=bNP+RT4LHx62w+v5YwxjUUc5Ohg=; b=OXMLmJ4OprgGgRYIi wSD2+loXEzurRqW+0RN9ITgrPmcadUVRQZKaJ5vdMx6gKbSBpch83vT3+TLrreox AbHp7aRa9TrWaZfMVIfFfy8xov/PiuOjiEv3Ru9a9brcYwQ1ahxmBHYCAzjGXXlJ z6A6rItc4Y3iqhpIbpjAYKoPiA= Received: (qmail 119201 invoked by alias); 26 Dec 2018 21:14:33 -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 119171 invoked by uid 89); 26 Dec 2018 21:14:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=audit, END, statement, janus 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; Wed, 26 Dec 2018 21:14:31 +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 wBQLETG0000204 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 26 Dec 2018 13:14:29 -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 wBQLETtf000203; Wed, 26 Dec 2018 13:14:29 -0800 (PST) (envelope-from sgk) Date: Wed, 26 Dec 2018 13:14:29 -0800 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [Committed] PR fortran/85357 -- add testcase Message-ID: <20181226211429.GA164@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) After reviewing the PR audit trail, I agree with Janus' comments #4 and #6, and I have converted his code example in comment #7 to the committed testcase. The originally reported ICE is gone on trunk, branch-7, and branch-8. However, branch-7 and branch-8, the compilation terminates with (null):0: confused by earlier errors, bailing out That (null) was the original source of the ICE, but the error machinery now protects against NULL pointer references. 2018-12-26 Steven G. Kargl PR fortran/85357 * gfortran.df/pr85357.f90: New test. Index: gcc/testsuite/gfortran.dg/pr85357.f90 =================================================================== --- gcc/testsuite/gfortran.dg/pr85357.f90 (nonexistent) +++ gcc/testsuite/gfortran.dg/pr85357.f90 (working copy) @@ -0,0 +1,17 @@ +! { dg-do compile } +module base + implicit none +contains + subroutine summation(i) + integer, intent(in) :: i + end subroutine +end module + +module extended + use base + implicit none +contains + subroutine summation() ! { dg-error "is already defined" } + end subroutine ! { dg-error "Expecting END MODULE statement" } +end module +! { dg-prune-output "is already defined at" }