The testcase gcc.dg/tree-prof/val-prof-7.c includes <strings.h> 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
<string.h> and does not provide a declaration of bzero).  OK to
commit?

2011-10-19  Joseph Myers  <jos...@codesourcery.com>

        * gcc.dg/tree-prof/val-prof-7.c: Declare bzero instead of
        including <strings.h>.

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 <strings.h>
+extern void bzero (void *, __SIZE_TYPE__);
 
 int foo(int len)
 {

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to