From patchwork Fri Mar 4 13:25: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: 592045 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 E7F5A140213 for ; Sat, 5 Mar 2016 00:27:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RkLp1sJ8; 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=O64BBGUUcrDjl1lm1y5 DDt4YluvHhyr/Z+sFYb6CDrPncPdvG1vBJnQRwWlgMfgBiNzWuSuKRBot/heAIqZ GjMyWSvfYGcDvDpQiI3cZo11LW1raviJy9vANUfLF2eFfj+Q8IGqU/QRbOz2Qdau lW5Ls/4Z3C0eji9lJbmaC3IM= 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=mb2C4L9eX50Pr6CwiLFkfBtVm io=; b=RkLp1sJ8TqQorjFCVAB286ZXPIx7godqEUXOY0ORuu6pgYE9iZPYY1EdM yBkKhPDylZMUu9LfwH48m+q8Pf1MgQk39tDsE2oQtDrQ8lIKLqXC4pIRpLWwQINT lrC5U6Sty2ZFJiF0YbqvGuvUKvp2bcFfeGWJvi9ciI+QVNiFsY= Received: (qmail 43289 invoked by alias); 4 Mar 2016 13:26:13 -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 43214 invoked by uid 89); 4 Mar 2016 13:26:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f54.google.com Received: from mail-wm0-f54.google.com (HELO mail-wm0-f54.google.com) (74.125.82.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 04 Mar 2016 13:26:10 +0000 Received: by mail-wm0-f54.google.com with SMTP id p65so29354585wmp.0 for ; Fri, 04 Mar 2016 05:26:10 -0800 (PST) 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=5VX/4qHLL1x5B0eNGeuGKt2fppbHd8RJKHFAlHh9iwk=; b=GXuk0NWwf37OC9TYATTO0KEBM+S0W2AkZROWqTkI9yFxipSBfnxxY7pYK9UV3Mv1Cn xkB0r4hMxbFfgPCd2YwfxbHTKQy8uaZQNLHFNyyyD9v3eIbIYnxU7v+EChy607PMx9wV 0VhhEZUROMXnZTewUPIMJ+Jdx0d9o41bK3K1/xHo2v68JJaypiPIghB2gjOoF3aD5g5Z dXg3UJ7SZsRqPIM/djFcENYgQxeOhPyZ5+xzin6KbItVxojYOFbkXU+jpXW5+L2q2eUN UId0HYgj99F61hAWWA9CNYfbMgmctnO+yljG0lkgs4w5fh0rqZN8bRV/TAZ/NluheeCx IISg== X-Gm-Message-State: AD7BkJJl713QV466T2LI90U2nZcfLEs5fjJytHyacnvvY5PFaQZs1gZD+NslYNL47eLXig== X-Received: by 10.28.194.68 with SMTP id s65mr4875143wmf.65.1457097967581; Fri, 04 Mar 2016 05:26:07 -0800 (PST) Received: from localhost (host86-138-94-184.range86-138.btcentralplus.com. [86.138.94.184]) by smtp.gmail.com with ESMTPSA id i5sm3366376wjx.15.2016.03.04.05.26.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Mar 2016 05:26:06 -0800 (PST) From: Andrew Burgess To: gcc-patches@gcc.gnu.org Cc: noamca@mellanox.com, Claudiu.Zissulescu@synopsys.com, Andrew Burgess Subject: [PATCH 09/10] gcc/arc: Add an nps400 specific testcase Date: Fri, 4 Mar 2016 13:25:41 +0000 Message-Id: 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/ChangeLog.NPS400 b/gcc/testsuite/ChangeLog.NPS400 index d658bd9..20f88d0 100644 --- a/gcc/testsuite/ChangeLog.NPS400 +++ b/gcc/testsuite/ChangeLog.NPS400 @@ -1,3 +1,7 @@ +2016-02-06 Andrew Burgess + + * gcc.target/arc/nps400-1.c: New file. + 2016-01-19 Andrew Burgess * gcc.target/arc/movh_cl-1.c: New file. 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..57d6800 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/nps400-1.c @@ -0,0 +1,23 @@ +/* { dg-do compile { target arc*-mellanox-* } } */ +/* { dg-options "-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) + ; +}