From patchwork Fri Mar 25 15:27:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 88389 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]) by ozlabs.org (Postfix) with SMTP id 35C981007D1 for ; Sat, 26 Mar 2011 02:27:24 +1100 (EST) Received: (qmail 7989 invoked by alias); 25 Mar 2011 15:27:21 -0000 Received: (qmail 7979 invoked by uid 22791); 25 Mar 2011 15:27:20 -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; Fri, 25 Mar 2011 15:27:13 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 290E8DBA for ; Fri, 25 Mar 2011 16:27:12 +0100 (CET) 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 dd8OfcN4JPwq for ; Fri, 25 Mar 2011 16:27:10 +0100 (CET) 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 AAC7EDB9 for ; Fri, 25 Mar 2011 16:27:10 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p2PFR9tD018953; Fri, 25 Mar 2011 16:27:09 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [testsuite] Fix gcc.dg/torture/pr47917.c on IRIX 6.5 Date: Fri, 25 Mar 2011 16:27:08 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 The new gcc.dg/torture/pr47917.c test currently fails the execution test on IRIX 6.5. To get a C99-conformant snprintf, one needs to include with _XOPEN_SOURCE defined as 500. The following patch does this. Tested with the appropriate runtest invocations on mips-sgi-irix6.5 and i386-pc-solaris2.11. Ok for mainline? Rainer 2011-03-25 Rainer Orth * gcc.dg/torture/pr47917.c: Add -D_XOPEN_SOURCE=500 to dg-options for mips-sgi-irix6.5. Replace snprintf prototype by . diff -r b835af6cfe0b gcc/testsuite/gcc.dg/torture/pr47917.c --- a/gcc/testsuite/gcc.dg/torture/pr47917.c Thu Mar 24 20:35:54 2011 +0100 +++ b/gcc/testsuite/gcc.dg/torture/pr47917.c Fri Mar 25 16:21:55 2011 +0100 @@ -1,11 +1,12 @@ /* { dg-do run } */ /* { dg-options "-std=c99" } */ +/* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target mips-sgi-irix6.5 } } */ /* { dg-xfail-if "no C99 snprintf function" { *-*-hpux10* } } */ /* { dg-xfail-run-if "non-conforming C99 snprintf" { *-*-hpux11.[012]* } } */ /* PR middle-end/47917 */ -extern int snprintf (char *, __SIZE_TYPE__, const char *, ...); +#include extern int memcmp (const void *, const void *, __SIZE_TYPE__); extern void abort (void);