From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104421 invoked by alias); 24 Nov 2015 08:08:39 -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 104412 invoked by uid 89); 24 Nov 2015 08:08:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Nov 2015 08:08:37 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1a18eP-0004lX-Ow from Thomas_Schwinge@mentor.com ; Tue, 24 Nov 2015 00:08:33 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Tue, 24 Nov 2015 00:08:33 -0800 Received: by tftp-cs (Postfix, from userid 49978) id EDCA3C224D; Tue, 24 Nov 2015 00:08:32 -0800 (PST) From: Thomas Schwinge To: Nathan Sidwell , Bernd Schmidt CC: GCC Patches Subject: Re: [ptx] Fix sso tests In-Reply-To: <5653740C.9010507@acm.org> References: <5653740C.9010507@acm.org> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Tue, 24 Nov 2015 08:20:00 -0000 Message-ID: <87k2p7rf9n.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2015-11/txt/msg02830.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 922 Hi! On Mon, 23 Nov 2015 15:16:12 -0500, Nathan Sidwell wrote: > The gcc.dg/sso tests gratuitously fail on PTX because they use IO facilit= ies=20 > that don't exist there. This patch changes the dumping to use the putch= ar=20 > function call (and not a macro), and not use fputs. > void put (const char s[]) > { > +#ifdef __nvptx__ > + int i; > + for (i =3D 0; s[i]; i++) > + putchar (s[i]); > +#else > fputs (s, stdout); > +#endif > } Doesn't __builtin_printf work? More generally, I've been wondering before, whether we should improve the I/O support in nvptx' newlib. I suppose (but have not verified) that the _stdout member of _REENT (struct _reent) will by default be initilized to &__sf_fake_stdout (and similar for stderr), which we could detect in nvptx I/O functions, and in such cases use the PTX printf function. Or something along these lines. Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWVBr0AAoJEK3/DN1sMFFt1xwH/jW8+6Dp7I4G1fcCyEnZ5I7J 8bYy3135935PGpMKdHU7vgJlfuLLhDPl3Ysy1ND4g3yHBJYumSv4kcO2ZziqQSVx 6A9PyyIDV4EJc3yh1COP5VrdjjzC/PLkR/h+nLDyeN/afVZuEIgBOMMeWD6Lixdc rA0/wFgMzCBgnyHSn2eLgM3RV3DsmLBoUcX37UCu3hZvZFJM6WKgvWwoLQ6+OmyZ IffWu6AZFu4IvEl+P9F5SuXMbbhmahCwmBJNRuO3jK7xGbrWCAy6BykQnJCvH0hP ULF82e1iLN10uggD6MZ8Nm/yVNPbWmVspQNb7jDHDU0ZFX7DAnNEa89l5+KIeXE= =AX0Q -----END PGP SIGNATURE----- --=-=-=--