From patchwork Tue Oct 20 19:54:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 533147 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 5A81714017E for ; Wed, 21 Oct 2015 06:54:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ZHh1KQ7l; 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=URCFnOqTXUXMSDngd6xulRospdkbxDct7oWBt8wbvQHv3bEdNN 1NaZLQvJpX3YG0f7YcIeDKYHYkh9KWtDD8V/UZsKDhEiIWMUwJfmZrsrQ6ANG3NU QqJvYZ7QtgtcFtSTJ8FTpbGufEQwzJEF9vRYQ/TQP6RzcB2vVySM76U8w= 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=3NkoDaNJejhWPe5dhLc+/xGP+6Y=; b=ZHh1KQ7l9hc/B5RuEijF oB1qS2XEgoynUoT1/sGW1mxRzEAWqn/Fx7pnzBWnKkZBmzhuwve69qEM4opGDgF8 gXgLyCaHm3SZvbX6oymLXhLorWF+XyihjfUFyBy0+ttNiU6+rSqco64bv+tpiCZk HCqLAhRBjmHByFmGJMPFLU8= Received: (qmail 127161 invoked by alias); 20 Oct 2015 19:54:50 -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 127144 invoked by uid 89); 20 Oct 2015 19:54:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f43.google.com Received: from mail-qg0-f43.google.com (HELO mail-qg0-f43.google.com) (209.85.192.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 20 Oct 2015 19:54:49 +0000 Received: by qgem9 with SMTP id m9so25564715qge.1 for ; Tue, 20 Oct 2015 12:54:47 -0700 (PDT) X-Received: by 10.140.93.1 with SMTP id c1mr6271684qge.59.1445370886978; Tue, 20 Oct 2015 12:54:46 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id i124sm1871949qhc.12.2015.10.20.12.54.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 12:54:46 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [gomp4] lto error message Message-ID: <56269C05.6030502@acm.org> Date: Tue, 20 Oct 2015 15:54:45 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Another small cleanup I noticed. We can use %qD to print a decl name. Applied to gomp4 branch. nathan 2015-10-20 Nathan Sidwell * lto-cgraph.c (input_overwrite_node): Cleanup openacc diagnostic emission. Index: gcc/lto-cgraph.c =================================================================== --- gcc/lto-cgraph.c (revision 229094) +++ gcc/lto-cgraph.c (working copy) @@ -1209,16 +1209,11 @@ input_overwrite_node (struct lto_file_de if (!success) { - if (flag_openacc) - { - if (TREE_CODE (node->decl) == FUNCTION_DECL) - error ("Missing routine function %<%s%>", node->name ()); - else - error ("Missing declared variable %<%s%>", node->name ()); - } - + gcc_assert (flag_openacc); + if (TREE_CODE (node->decl) == FUNCTION_DECL) + error ("missing OpenACC % function %qD", node->decl); else - gcc_unreachable (); + error ("missing OpenACC % variable %qD", node->decl); } }