From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63359 invoked by alias); 21 Apr 2016 11:40:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 63174 invoked by uid 89); 21 Apr 2016 11:40:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f52.google.com Received: from mail-wm0-f52.google.com (HELO mail-wm0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 21 Apr 2016 11:39:55 +0000 Received: by mail-wm0-f52.google.com with SMTP id 127so3045220wmz.0 for ; Thu, 21 Apr 2016 04:39:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=q9KJYC6Du4M9WUSUM+Fr819q4belxFOEjDiTkNuOM0Y=; b=DZe1GukaZkpg08b2dq9TxthIBM7jAt3a+ad2AkrFrn72fHjhRrmbMxe1HyLENwZR8n 76VoDMEFNlxd+teKO1hwEQxmRxcHVPgkkubKvHHPCqQAlaWTa6PJMJrVdiI2NexjSxib DbMV6oapTA1rHCdczIMD3UcggvlyHUotbgdovKaXuAsEgXA4OVfivdwdUognSB+vpgk8 uRtPxrSJ3zJJ/Ud8S0MeGG2SyxTP+Dr8yw8jiP1+SB4s3l5Z3OSFXjg6/dK7llZVa2+/ QTTlxOCKeWCfeC+16X42eBuwHRMk1uL8QBRSYvhCK/ozdMmBCznMWCKjt+fBwaxMMeOm tOmQ== X-Gm-Message-State: AOPr4FXqqfAQsE7xZTA6QBVIysseHeKmJN5xGdio+oO2YqWXCReom7C/8fDPnJY3DFpk0Q== X-Received: by 10.28.25.67 with SMTP id 64mr22473334wmz.10.1461238792854; Thu, 21 Apr 2016 04:39:52 -0700 (PDT) Received: from localhost (host86-155-190-186.range86-155.btcentralplus.com. [86.155.190.186]) by smtp.gmail.com with ESMTPSA id w10sm2439572wjz.9.2016.04.21.04.39.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Apr 2016 04:39:52 -0700 (PDT) From: Andrew Burgess To: gcc-patches@gcc.gnu.org, gnu@amylaar.uk Cc: noamca@mellanox.com, Claudiu.Zissulescu@synopsys.com, Andrew Burgess Subject: [PATCHv2 7/7] gcc/arc: Add an nps400 specific testcase Date: Thu, 21 Apr 2016 11:40:00 -0000 Message-Id: <8e641c75960596f23d72b205aa3952e5b032d06b.1461238348.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg01151.txt.bz2 This test case triggered a bug caused by VOIDmode not being handled in proper_comparison_operator, this problem was fixed with a commit on 2016-01-27 by Claudiu Zissulescu, adding this test case for coverage. gcc/testsuite/ChangeLog: * gcc.target/arc/nps400-1.c: New file. --- gcc/testsuite/ChangeLog.NPS400 | 4 ++++ gcc/testsuite/gcc.target/arc/nps400-1.c | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.target/arc/nps400-1.c diff --git a/gcc/testsuite/gcc.target/arc/nps400-1.c b/gcc/testsuite/gcc.target/arc/nps400-1.c new file mode 100644 index 0000000..f3d6271 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/nps400-1.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-mcpu=nps400 -mq-class -mbitops -munaligned-access -mcmem -O2 -fno-strict-aliasing" } */ + +enum npsdp_mem_space_type { + NPSDP_EXTERNAL_MS = 1 +}; +struct npsdp_ext_addr { + struct { + struct { + enum npsdp_mem_space_type mem_type : 1; + unsigned msid : 5; + }; + }; + char user_space[]; +} a; +char b; +void fn1() { + ((struct npsdp_ext_addr *)a.user_space)->mem_type = NPSDP_EXTERNAL_MS; + ((struct npsdp_ext_addr *)a.user_space)->msid = + ((struct npsdp_ext_addr *)a.user_space)->mem_type ? 1 : 10; + while (b) + ; +} -- 2.6.4