From patchwork Tue Oct 20 18:34:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Monakov X-Patchwork-Id: 533099 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 7D8351402B3 for ; Wed, 21 Oct 2015 05:34:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Qxh2vBMF; 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:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=JBdPwom2xPLHPizUUJuG0vxs3fB6xBgqVNYBE8HrowSL5h5M6VJ8s OvP/ToXd20J0q9XNvP4WW8l7I61gRFWE+X7dmEscV6NSjCiIdN5i5v46itE/6opF kk4lG1LnEE4Hp6s9N0F4nRvMIBhWUZX7+vCGDQv+5UC+AF7jv97d8Q= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=b2JufvUTlaAdBoCzA23ZExYEydI=; b=Qxh2vBMFpboRJKFeDHTY fwkqXmViCBJNqyQ4aohZ1JqCRqbyhQ43Y14wQlPenITqslW/7RFwKmFCpf65gDiy G0JfA2aMcdNJW7hiUB5J/Cb5Yxyp4RPb3kpU1BiegsIuFeQ7V8onVoz4iO53ZPLk F8ENrvdZxIhyJ6FsB4aIsLs= Received: (qmail 7743 invoked by alias); 20 Oct 2015 18:34:42 -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 7717 invoked by uid 89); 20 Oct 2015 18:34:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: smtp.ispras.ru Received: from smtp.ispras.ru (HELO smtp.ispras.ru) (83.149.199.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Oct 2015 18:34:39 +0000 Received: from condor.intra.ispras.ru (unknown [83.149.199.91]) by smtp.ispras.ru (Postfix) with ESMTP id 3A90320509; Tue, 20 Oct 2015 21:34:36 +0300 (MSK) Received: by condor.intra.ispras.ru (Postfix, from userid 23246) id D87DB1225DBC; Tue, 20 Oct 2015 21:34:36 +0300 (MSK) From: Alexander Monakov To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek , Dmitry Melnik Subject: [gomp4 04/14] nvptx: fix output of _Bool global variables Date: Tue, 20 Oct 2015 21:34:26 +0300 Message-Id: <1445366076-16082-5-git-send-email-amonakov@ispras.ru> In-Reply-To: <1445366076-16082-1-git-send-email-amonakov@ispras.ru> References: <1445366076-16082-1-git-send-email-amonakov@ispras.ru> X-IsSubscribed: yes Due to special treatment of types, emitting variables of type _Bool in global scope is impossible: extern references are emitted with .u8, but definitions use .u64. This patch fixes the issue by treating boolean type as integer types. * config/nvptx/nvptx.c (init_output_initializer): Also accept BOOLEAN_TYPE. --- gcc/config/nvptx/nvptx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 779b018..cfb5c4f 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -1863,6 +1863,7 @@ init_output_initializer (FILE *file, const char *name, const_tree type, int sz = int_size_in_bytes (type); if ((TREE_CODE (type) != INTEGER_TYPE && TREE_CODE (type) != ENUMERAL_TYPE + && TREE_CODE (type) != BOOLEAN_TYPE && TREE_CODE (type) != REAL_TYPE) || sz < 0 || sz > HOST_BITS_PER_WIDE_INT)