From patchwork Wed Oct 19 23:25:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 120706 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 7DD8FB71AD for ; Thu, 20 Oct 2011 10:25:37 +1100 (EST) Received: (qmail 17314 invoked by alias); 19 Oct 2011 23:25:35 -0000 Received: (qmail 17302 invoked by uid 22791); 19 Oct 2011 23:25:34 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Oct 2011 23:25:18 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RGfVd-0006jE-Q9 from joseph_myers@mentor.com ; Wed, 19 Oct 2011 16:25:17 -0700 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 20 Oct 2011 00:25:16 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1RGfVb-0005t3-2C; Wed, 19 Oct 2011 23:25:15 +0000 Date: Wed, 19 Oct 2011 23:25:15 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: ro@CeBiTec.Uni-Bielefeld.DE, mikestump@comcast.net Subject: Avoid gcc.dg/tree-prof/val-prof-7.c dependence on Message-ID: MIME-Version: 1.0 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 testcase gcc.dg/tree-prof/val-prof-7.c includes to get a declaration of bzero. This causes it to fail on targets where bzero (a legacy function removed in the latest version of POSIX) is not declared in that header; declaring it explicitly in the testcase is more reliable. This patch changes the include to an explicit declaration. Tested with cross to i686-mingw32 (where the header just includes and does not provide a declaration of bzero). OK to commit? 2011-10-19 Joseph Myers * gcc.dg/tree-prof/val-prof-7.c: Declare bzero instead of including . Index: gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c =================================================================== --- gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c (revision 180200) +++ gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c (working copy) @@ -1,7 +1,7 @@ /* { dg-options "-O2 -fdump-ipa-profile -mtune=core2" } */ /* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */ -#include +extern void bzero (void *, __SIZE_TYPE__); int foo(int len) {