From patchwork Wed Dec 30 15:54:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 561774 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 68778140BE2 for ; Thu, 31 Dec 2015 02:54:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=xsYaLSox; 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=lnGtxS6TbuepB1jhOzsfI+5cr9jAYwQ2j9/OGjzIJS3YR2BpjD woCgepgrB7t98WdEBpI37xBISDp8qAZH6PCzpWMKJnLzwnd8klyVe+ft5phqdh95 Nws2W6tNfPgfsQxfNMz0dbKIBrwDK8iUIYG/JNOxQlxBjOfOwjSeHFmX0= 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=VwYaDk2S5ZuxnCxCW3X5rGJZUaI=; b=xsYaLSoxcTLo2x/amdFf EKlWwuKlPfWA+ARPg8cwXiLiHRIGyLjCdGwvhG+wI8zsnbqDzQ+Z2JUmS+Lk+JcV FrMchpGXW71zI+VU3wsBSv//AwT2X1cz0qC03EsLYJ+wA8VnCyNehyQ1WHC5MC89 ouuWtG3jePjcmvGLBYxkqT8= Received: (qmail 114291 invoked by alias); 30 Dec 2015 15:54:48 -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 114275 invoked by uid 89); 30 Dec 2015 15:54:47 -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 spammy=decls, TREE_PUBLIC, tree_public, ptx X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 30 Dec 2015 15:54:46 +0000 Received: by mail-qg0-f52.google.com with SMTP id b35so56109381qge.0 for ; Wed, 30 Dec 2015 07:54:46 -0800 (PST) X-Received: by 10.140.30.197 with SMTP id d63mr85543678qgd.81.1451490884552; Wed, 30 Dec 2015 07:54:44 -0800 (PST) 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 m107sm31217444qgm.19.2015.12.30.07.54.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Dec 2015 07:54:43 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: [PTX] avoid constant pool bug Message-ID: <5683FE43.4010404@acm.org> Date: Wed, 30 Dec 2015 10:54:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 I've committed this to workaround the middle-end problem with the varpool thinking (some) cpool objects are undefined. Still looking at a proper fix for that, but as attempt one fell over ppc problems, I've applied this in the meanwhile. nathan 2015-12-30 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_assemble_undefined_decl): Check it's not a constant pool object. Index: config/nvptx/nvptx.c =================================================================== --- config/nvptx/nvptx.c (revision 232002) +++ config/nvptx/nvptx.c (working copy) @@ -1718,6 +1718,11 @@ nvptx_globalize_label (FILE *, const cha static void nvptx_assemble_undefined_decl (FILE *file, const char *name, const_tree decl) { + /* The middle end can place constant pool decls into the varpool as + undefined. Until that is fixed, catch the problem here. */ + if (DECL_IN_CONSTANT_POOL (decl)) + return; + write_var_marker (file, false, TREE_PUBLIC (decl), name); fprintf (file, "\t.extern ");