From patchwork Mon Jan 15 10:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 860715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-471247-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="CQyLwM3g"; dkim-atps=neutral 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 3zKpt215z6z9sDB for ; Mon, 15 Jan 2018 21:06:48 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=dcycHZkPAVz3WaLD xE2RtDOpxpUx2ElPgYRhkF8meQy77FhQD3dDVoP/5ajjTzin478lwc+EWw2h7y7H ji/28y0mmzb3IoCf9xwfeGdL7A0tQOHwlbRbia0VbeDuWHhVJt2Xus7sDdXsbp3U 1nfyIcqn3Vux/XK2y5LtHaKE46U= 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:to:cc :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=67z0VlBAghsd9r0OsWF9S7 AAK9I=; b=CQyLwM3gNVvL7BYVc7cfrIAEnm2/yN5ET72QlNLJLIqfPkCo3BEAZl qiQg8hzm4x6q1JOhL9JgfvO4Gs+BsO08f8mdTheOourevWi0WBuMBIQ1amaOwC5A m2m/2E32lZveVa9vkexFTa1FjjyzFipNzCmhzkmWYK36pYxlyaxuk= Received: (qmail 2060 invoked by alias); 15 Jan 2018 10:06: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 2006 invoked by uid 89); 15 Jan 2018 10:06:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:mail.hi, H*r:521, H*r:AUTH, Hx-languages-length:1329 X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.163) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 15 Jan 2018 10:06:38 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3koxZnKXKoq0dKoR0veqDn+abI2nramdeIcmg== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.123] (mail.hightec-rt.com [213.135.1.215]) by smtp.strato.de (RZmta 42.15 DYNA|AUTH) with ESMTPSA id J03f5fu0FA6aCeM (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Mon, 15 Jan 2018 11:06:36 +0100 (CET) To: gcc-patches Cc: Denis Chertykov From: Georg-Johann Lay Subject: [patch,avr,committed] Add tests for PR83801. Message-ID: Date: Mon, 15 Jan 2018 11:06:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Added the following avr specific test cases for the already fixed PR83801. Johann PR c/83801 PR c/83729 * gcc.target/avr/torture/pr83729.c: New test. * gcc.target/avr/torture/pr83801.c: New test. Index: gcc.target/avr/torture/pr83729.c =================================================================== --- gcc.target/avr/torture/pr83729.c (nonexistent) +++ gcc.target/avr/torture/pr83729.c (working copy) @@ -0,0 +1,17 @@ +/* { dg-options { "-std=gnu99" } } */ +/* { dg-do run { target { ! avr_tiny } } } */ + +__attribute((noinline,noclone)) +char to_ascii (unsigned i) +{ + static const char __memx code_tab[] = "0123456789"; + return code_tab[i]; +} + +int main() +{ + if (to_ascii (2) != '2') + __builtin_abort(); + + return 0; +} Index: gcc.target/avr/torture/pr83801.c =================================================================== --- gcc.target/avr/torture/pr83801.c (nonexistent) +++ gcc.target/avr/torture/pr83801.c (working copy) @@ -0,0 +1,17 @@ +/* { dg-options { "-std=gnu99" } } */ +/* { dg-do run { target { ! avr_tiny } } } */ + +__attribute((noinline,noclone)) +char to_ascii (unsigned i) +{ + static const char __flash code_tab[] = "0123456789"; + return code_tab[i]; +} + +int main() +{ + if (to_ascii (2) != '2') + __builtin_abort(); + + return 0; +}