From patchwork Wed Apr 19 11:27:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumar Selvaraj X-Patchwork-Id: 752215 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 3w7KWt6gyYz9rxw for ; Wed, 19 Apr 2017 21:28:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="nt9VqdZ1"; 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:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=F2quOR5Gd9qFlCSzgbVvlcukEfg0U1hIzRpRsypbSEsYp8qWBrlCU z95Sy36DaQgzbruEPP7uBuM3eH0m5bScx6vzjXarXJ1Wk8g0YoczsyEMpl3iG2ib OTWgiqTLIIAkCwkGVhkMrKlkHvIfMi6Ab5YQ95536wB9cQqFKQ5oTo= 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:subject:date:message-id:mime-version:content-type; s= default; bh=Rmd5r3QwQ5yEuOLAYwbLLw5XmsM=; b=nt9VqdZ15RnKRJq79rIi nDlsOmM/UFwKVZIkWapmCisFxrnptJEnu24H25V4666Pk373RRdBsapLPk29f+m6 Reesyp2NVTx9NbgIu0WzrNkLMa9JeVWlDhTjpqnWNusb37DmKogQ+OgnLCNGDVaj gYiMabGRipPbOyQnAXoquD8= Received: (qmail 15797 invoked by alias); 19 Apr 2017 11:28:43 -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 15747 invoked by uid 89); 19 Apr 2017 11:28:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:AES256-SHA, Hx-spam-relays-external:sk:smtpout, H*RU:sk:smtpout X-HELO: esa3.microchip.iphmx.com Received: from Unknown (HELO esa3.microchip.iphmx.com) (68.232.153.233) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 11:28:40 +0000 Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA; 19 Apr 2017 04:28:35 -0700 Received: from jaguar.microchip.com (10.10.76.4) by chn-sv-exch05.mchp-main.com (10.10.76.106) with Microsoft SMTP Server id 14.3.181.6; Wed, 19 Apr 2017 04:28:33 -0700 User-agent: mu4e 0.9.18; emacs 25.1.1 From: Senthil Kumar Selvaraj To: "gcc-patches@gcc.gnu.org" Subject: [Patch, testsuite] Fix broken pr80341.c for avr Date: Wed, 19 Apr 2017 16:57:28 +0530 Message-ID: <87o9vsy6vz.fsf@microchip.com> MIME-Version: 1.0 Hi, This patch skips pr80341.c for targets with int size less than 32 bits. The assertion in the testcase holds only if sizeof(int) > sizeof(short), which isn't true for smaller int size targets like the avr. Specifically, after integer promotion, the "usual arithmetic conversion" of the unsigned short to signed int doesn't occur, and this causes the test to fail. Committed as obvious. Regards Senthil 2017-04-19 Senthil Kumar Selvaraj * gcc.dg/torture/pr80341.c: Require int32plus. Index: gcc.dg/torture/pr80341.c =================================================================== --- gcc.dg/torture/pr80341.c (revision 246991) +++ gcc.dg/torture/pr80341.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-additional-options "-Wno-overflow" } */ +/* { dg-require-effective-target int32plus } */ const signed char c = -84; signed char s;