From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21901 invoked by alias); 11 Apr 2011 18:20:11 -0000 Received: (qmail 21885 invoked by uid 22791); 11 Apr 2011 18:20:10 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Apr 2011 18:20:05 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id BCF00186 for ; Mon, 11 Apr 2011 20:20:03 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wdQ9gjM49EeE for ; Mon, 11 Apr 2011 20:20:01 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id A41FD185 for ; Mon, 11 Apr 2011 20:20:01 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p3BIJtK3026392; Mon, 11 Apr 2011 20:19:55 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [testsuite] Fix gcc.dg/torture/pr47917.c on Tru64 UNIX V5.1 Date: Mon, 11 Apr 2011 18:20:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg00782.txt.bz2 As on several platforms, gcc.dg/torture/pr47917.c was failing on Tru64 UNIX V5.1. To get a standards-conformant snprintf (and vsnprintf), one needs to define _ISO_C_SOURCE=19990L (sic!). Initially, I tried to solve the problem in a general way by always defining that macro with -stdc=c99|gnu99, but that opened a can of worms: if that macro is defined, many other feature test macros like _XOPEN_SOURCE, POSIX_SOURCE, _OSF_SOURCE are gone and bootstrap fails all over (i.e. any target library which depends on C99 features like libgfortran, libjava, and libstdc++). The seems to be no way to do this properly, so I've chosen the easy way out and define the macro just for the single testcase. Tested with the appropriate runtest invocation, installed on mainline. Rainer 2011-04-11 Rainer Orth * gcc.dg/torture/pr47917.c: Define _ISO_C_SOURCE=19990L for alpha*-dec-osf5*. Index: gcc/testsuite/gcc.dg/torture/pr47917.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr47917.c (revision 172269) +++ gcc/testsuite/gcc.dg/torture/pr47917.c (revision 172270) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-std=c99" } */ +/* { dg-options "-std=c99 -D_ISO_C_SOURCE=19990L" { target alpha*-dec-osf5* } } */ /* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target mips-sgi-irix6.5 *-*-solaris2.[89] } } */ /* { dg-options "-std=gnu99" { target *-*-hpux* } } */ /* { dg-xfail-if "no C99 snprintf function" { *-*-hpux10* } } */ Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (revision 172269) +++ gcc/testsuite/ChangeLog (revision 172270) @@ -1,3 +1,8 @@ +2011-04-11 Rainer Orth + + * gcc.dg/torture/pr47917.c: Define _ISO_C_SOURCE=19990L for + alpha*-dec-osf5*. + 2011-04-11 Martin Jambor PR tree-optimization/48195 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University