From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Archive: List-Post: List-Help: Sender: gcc-patches-owner@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 20:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050000060903060406090801" X-SW-Source: 2015-11/txt/msg02787.txt.bz2 This is a multi-part message in MIME format. --------------050000060903060406090801 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 337 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 --------------050000060903060406090801 Content-Type: text/x-patch; name="trunk-sso.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="trunk-sso.patch" Content-length: 796 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) --------------050000060903060406090801--