From patchwork Mon Nov 23 20:16:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 547739 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 30C301402A5 for ; Tue, 24 Nov 2015 07:16:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=odjVkzC9; 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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=HvXG2ujvYVPMU1BwClrnEzZfRQ+CTNkYi98A0ljuT8iOLXNa08 dE1QXhWDspavyeO3ZIV1Fu5Z7obIFYp8QvPz4KYO09qqTpm+ie+soNprwdmUf8Ly hfPnOtrMX1piv181DkhhzZbtnipp/SoK0hOra/s5xiQBDDagLjAeUwFFM= 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; s= default; bh=9RWdmSd3sO/iHotilk/uWfR7Av8=; b=odjVkzC9fCyLEWz7iLXS IUMmcFYADhjTZWRaio/KDv7Xa9pWdjCslSfCJgi4rGXKYTDjKvinGTU9Xrf8LcIL pV8uy/PgG+fpchfq0wxccq4B2u+W+R/buJRblnjPe3Ouc4H+C0F/JVrfHrru7cVx EDyKwv3fD61ULrA3+vHzryc= Received: (qmail 50794 invoked by alias); 23 Nov 2015 20:16:18 -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 50778 invoked by uid 89); 23 Nov 2015 20:16:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vk0-f53.google.com Received: from mail-vk0-f53.google.com (HELO mail-vk0-f53.google.com) (209.85.213.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 23 Nov 2015 20:16:16 +0000 Received: by vkfr145 with SMTP id r145so46236150vkf.0 for ; Mon, 23 Nov 2015 12:16:14 -0800 (PST) X-Received: by 10.31.16.40 with SMTP id g40mr20739059vki.140.1448309774281; Mon, 23 Nov 2015 12:16:14 -0800 (PST) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id g68sm11959018vki.22.2015.11.23.12.16.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 12:16:13 -0800 (PST) To: GCC Patches Cc: Bernd Schmidt From: Nathan Sidwell Subject: [ptx] Fix sso tests Message-ID: <5653740C.9010507@acm.org> Date: Mon, 23 Nov 2015 15:16:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 The gcc.dg/sso tests gratuitously fail on PTX because they use IO facilities that don't exist there. This patch changes the dumping to use the putchar function call (and not a macro), and not use fputs. With this they all pass. I'm not quite sure where the maintainer boundaries lie for this kind of fix. Any objections? nathan 2015-11-23 Nathan Sidwell * gcc.dg/sso/dump.h: Force IO to be putchar function call on nvptx. Index: gcc/testsuite/gcc.dg/sso/dump.h =================================================================== --- gcc/testsuite/gcc.dg/sso/dump.h (revision 230718) +++ gcc/testsuite/gcc.dg/sso/dump.h (working copy) @@ -1,3 +1,9 @@ +#ifdef __nvptx__ +/* Force function call. NVPTX's IO is extremely limited. */ +#undef putchar +#define putchar (putchar) +#endif + void dump (void *p, unsigned int len) { const char digits[17] = "0123456789abcdef"; @@ -14,7 +20,13 @@ void dump (void *p, unsigned int len) void put (const char s[]) { +#ifdef __nvptx__ + int i; + for (i = 0; s[i]; i++) + putchar (s[i]); +#else fputs (s, stdout); +#endif } void new_line (void)