From patchwork Mon Sep 28 15:41:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Norris X-Patchwork-Id: 523377 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 4030814017E for ; Tue, 29 Sep 2015 01:42:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RezFzkvX; 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=AEbEw61VURUl+k6UyNun4wJnMR5oOLenGf76K1SoxUDcQH EB+iqrY2t19VyyJQdsPG8yo5vAGzioikdcFIr7+LFk3vjzVplg1BNHimv75JlqVY f3gtA9//88JvRkBDuKj+daNOYNRQWmvqsdJIEBjnbwzLznM38bWJoO23mNE0A= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=+sha51LIlhfCos/QxeNcrXhkZHU=; b=RezFzkvX1lvLXR1lpyzv ZemW53N+QZGzK9QV7PL/gsiAWNtlzCNSGH1ummHQ5eAAdKE9bNH1svR2zzJGDKWk CiB+Zq7JsCX0VBpd37EQLwVTt1Y8dBc1KKjmo45ok3LMArNeYQzpn6u7+dP9BhaG kCknkEjMGWwjLWP05Pu0uxo= Received: (qmail 75818 invoked by alias); 28 Sep 2015 15:41:57 -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 75139 invoked by uid 89); 28 Sep 2015 15:41:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_20, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 Sep 2015 15:41:55 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1ZgaYq-0001Wn-Kf from James_Norris@mentor.com for gcc-patches@gcc.gnu.org; Mon, 28 Sep 2015 08:41:52 -0700 Received: from [172.30.80.210] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Mon, 28 Sep 2015 08:41:51 -0700 Message-ID: <56095FBD.8080505@mentor.com> Date: Mon, 28 Sep 2015 10:41:49 -0500 From: James Norris User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Subject: [gomp4] Remove erroneous test and unreachable situation. Hi, The attached patch removes an erroneous attribute test and an unreachable situation. Both showed up when dealing with the routine directive and the name option where the name was the identical to the name of the function / subroutine. Committed after regtest on x86_64 and powerpc64le. Thanks! Jim diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 55eed48..44cbec1 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -1755,14 +1755,6 @@ gfc_match_oacc_routine (void) return MATCH_ERROR; } - if (!sym->attr.external && !sym->attr.function && !sym->attr.subroutine) - { - gfc_error ("Syntax error in !$ACC ROUTINE ( NAME ) at %C, invalid" - " function name %qs", sym->name); - gfc_current_locus = old_loc; - return MATCH_ERROR; - } - if (gfc_match_char (')') != MATCH_YES) { gfc_error ("Syntax error in !$ACC ROUTINE ( NAME ) at %C, expecting" @@ -1798,8 +1790,6 @@ gfc_match_oacc_routine (void) gfc_current_ns->proc_name->attr.oacc_function = gfc_oacc_routine_dims (c) + 1; } - else - gcc_unreachable (); if (n) n->clauses = c;