From patchwork Sun Dec 11 22:21:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 87613 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1361783qgi; Sun, 11 Dec 2016 14:22:09 -0800 (PST) X-Received: by 10.99.61.6 with SMTP id k6mr161614643pga.154.1481494929142; Sun, 11 Dec 2016 14:22:09 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 37si41417652plq.20.2016.12.11.14.22.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Dec 2016 14:22:09 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444112-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444112-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444112-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=netcologne.de 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=D8uJ+IU2YhWIkjX+xPkqjVnlAGFHhGpJer9lkOrv6kzk+w4Ndy rf5eJQgLLaC0T3AmcAJbqxhRiiPyzQlZ8xRtBhUvEKv47FvrWPTiGAyhFYfvlCuC VBaKBTljm9TBf1sSGo7f7EcSBa2aRyHeNdQXzDR8smPDAxNosiPE1mVUs= 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=jdsqGwIyLOPg3mR8TfJj3e2lzdg=; b=RxU5zhn6BTEYV1xBrqhs DpjHnHN53ZD5Cpi6hLHA8NzjVxSiQD5Tb0e8OJvT53+GJsZiBAP37Q87sIBrYOzZ LMAb8AQq2JoLRc5v9E/fgaT876Ejfp8AOVCZX+EWRFy5F2w7m/E5N93y4nYj9HRZ Ofxn4gtHd03PFHenSpBclmw= Received: (qmail 48637 invoked by alias); 11 Dec 2016 22:21:55 -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 48598 invoked by uid 89); 11 Dec 2016 22:21:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_20, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=attruntyped, *defer, 922, 8, 9228 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; Sun, 11 Dec 2016 22:21:44 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 916EA1268E; Sun, 11 Dec 2016 23:21:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 8D7A211E00; Sun, 11 Dec 2016 23:21:40 +0100 (CET) Received: from [78.35.138.245] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 584dd174-022c-7f0000012729-7f00000199b1-1 for ; Sun, 11 Dec 2016 23:21:40 +0100 Received: from [192.168.178.20] (xdsl-78-35-138-245.netcologne.de [78.35.138.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA; Sun, 11 Dec 2016 23:21:39 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran] Fix ICEs with -fimplicit-none Message-ID: Date: Sun, 11 Dec 2016 23:21:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 Hello world, the attached patch fixes a 5/6/7 regression with -fimplicit-none. Regression-tested. OK for all affected branches? Regards Thomas 2016-12-11 Thomas Koenig PR fortran/78239 * decl.c(char_len_param_value): Also check for -fimplicit-none when determining if implicit none is in force. 2016-12-11 Thomas Koenig PR fortran/78239 * gfortran.dg/fimplicit_none_1.f90: New test. * gfortran.dg/fimplicit_none_2.f90: New test. Index: decl.c =================================================================== --- decl.c (Revision 243516) +++ decl.c (Arbeitskopie) @@ -922,7 +922,8 @@ char_len_param_value (gfc_expr **expr, bool *defer if (!t && e->ts.type == BT_UNKNOWN && e->symtree->n.sym->attr.untyped == 1 - && (e->symtree->n.sym->ns->seen_implicit_none == 1 + && (flag_implicit_none + || e->symtree->n.sym->ns->seen_implicit_none == 1 || e->symtree->n.sym->ns->parent->seen_implicit_none == 1)) { gfc_free_expr (e);