The testcase gcc.dg/20050922-1.c relies on the header stdint.h, which is not provided by GCC. This causes it to fail on systems such as hppa2.0w-hp-hpux11.11 which have inttypes.h but not stdint.h. The simplest fix would be to define uint32_t locally in the testcase, along the lines of #if __INT_MAX__ == 2147483647 typedef unsigned int uint32_t; #else typedef unsigned long uint32_t; #endif (not tested).
I could swore there were other testcases which included stdint.h but there is not. Anyways, your definition of int32_t is wrong for some targets.
Subject: Re: gcc.dg/20050922-1.c relies in stdint.h On Wed, 28 Sep 2005, pinskia at gcc dot gnu dot org wrote: > I could swore there were other testcases which included stdint.h but there is not. > Anyways, your definition of int32_t is wrong for some targets. It's not meant to be correct everywhere, simply to be more widely functional than the present testcase. You could of course check __INT_MAX__, __LONG_MAX__, __SHRT_MAX and __SCHAR_MAX__ and conditionally run a trivial program if none of those is correct - what you can't do is mark the test UNSUPPORTED based on preprocessor conditionals if a 32-bit type is unavailable.
This failure has appeared on 4.0 branch, for hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11, on 20051014. This bug can be fixed as a testsuite problem without fixing bug 448: the test doesn't intrinsically need the whole of <stdint.h>, just one type which can be approximated if available from the standard type limits.
Subject: Bug 24107 CVSROOT: /cvs/gcc Module name: gcc Changes by: pbrook@gcc.gnu.org 2005-10-24 12:55:37 Modified files: gcc/testsuite : ChangeLog gcc/testsuite/gcc.dg: 20050922-1.c Log message: 2005-10-24 Paul Brook <paul@codesourcery.com> PR 24107 * gcc.dg/20050922-1.c: Provide definition of uint32_t without using stdint.h. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6240&r2=1.6241 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20050922-1.c.diff?cvsroot=gcc&r1=1.2&r2=1.3
Fixed
*** Bug 25831 has been marked as a duplicate of this bug. ***
I still see this with 4.0.4.
Subject: Bug 24107 Author: danglin Date: Sun Jan 14 17:25:05 2007 New Revision: 120776 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120776 Log: PR testsuite/24107 Backport from mainline 2005-10-24 Paul Brook <paul@codesourcery.com> * gcc.dg/20050922-1.c: Provide definition of uint32_t without using stdint.h. Modified: branches/gcc-4_0-branch/gcc/testsuite/ChangeLog branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/20050922-1.c