From patchwork Thu Apr 21 11:39:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 613068 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 3qrGzp2QLFz9sDD for ; Thu, 21 Apr 2016 21:41:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=sVEq9kb6; 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 :in-reply-to:references; q=dns; s=default; b=A+ObIUx5u87/7mchNto WHF+ie9wY4Mc3vJVjjhNoE9ViiZ/Pcap+3RLkCGXuzjez9XFRmT6IPFqOaqLMlPa sg0YBJDpczuaBNfMCF0tzRp9Ve1QZZ6MC9WQGjo7XWMOkUpK2N0BNAfVX6QcMBq4 RE+YJYAZyKQvzcPwnmKXVXL8= 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 :in-reply-to:references; s=default; bh=KEa9Bjpbh9cd3UR4IFxsVPXE0 wI=; b=sVEq9kb6EY3b6szF72FH+UJRKsgCxWEmaS+40IAK4IiKfdnUvW58u1IKh uFBoT9spJwnuskSkMLrevp9GDFRhrX30t7ZHdDnojVr7aDhLqQRKpEzHNbJqaQL2 upfHtlIfvyk4usQPUeL87TFevJ9hfBpkoD1gZw69hz19EM1Yok= 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-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 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 12:39:41 +0100 Message-Id: <8e641c75960596f23d72b205aa3952e5b032d06b.1461238348.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes 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) + ; +}