Bug 18345 - mmix-knuth-mmixware testsuite failure: gcc.dg/intmax_t-1.c
Summary: mmix-knuth-mmixware testsuite failure: gcc.dg/intmax_t-1.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-07 05:35 UTC by Hans-Peter Nilsson
Modified: 2004-12-01 00:41 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: mmix-knuth-mmixware
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-11-09 10:00:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2004-11-07 05:35:31 UTC
With LAST_UPDATED: "Sat Nov  6 19:25:03 GMT 2004" I get:
FAIL: gcc.dg/intmax_t-1.c (test for excess errors)

With the message in the .log being:
/gcc/testsuite/gcc.dg/intmax_t-1.c:7:22: error: inttypes.h: No such file or
directory
(further errors withheld)

inttypes.h isn't a standard header, neither is it provided by GCC.
The test is wrong and should only be compiled on systems known to
have inttypes.h.  (According to notes in PR 448 at least Solaris and
glibc.)

The test has never worked on this target.
Comment 1 jsm-csl@polyomino.org.uk 2004-11-07 11:04:25 UTC
Subject: Re:  New: mmix-knuth-mmixware testsuite failure:
 gcc.dg/intmax_t-1.c

On Sun, 7 Nov 2004, hp at gcc dot gnu dot org wrote:

> inttypes.h isn't a standard header, neither is it provided by GCC.
> The test is wrong and should only be compiled on systems known to
> have inttypes.h.  (According to notes in PR 448 at least Solaris and
> glibc.)

That would rather defeat the point of ensuring that GCC's definition of 
intmax_t agrees with the target's when a target which didn't previously 
have one acquires one.  The use of inttypes.h, a header only required of 
hosted but not freestanding implementations, is deliberate because of 
pre-C99 systems that have <inttypes.h> but not <stdint.h>.

wchar_t-1.c and wint_t-1.c used to be xfailed on systems lacking 
<wchar.h>, something similar could be used on systems lacking inttypes.h 
so when they gain the header the compilation XPASSes but the test for 
excess errors still fails if the type is incorrect.

Comment 2 Hans-Peter Nilsson 2004-11-09 09:48:36 UTC
Confirmed, separate system than original report, with "Tue Nov  9 00:36:20 UTC
2004" (no .log reconfirmation)
Comment 3 GCC Commits 2004-11-28 22:39:10 UTC
Subject: Bug 18345

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hp@gcc.gnu.org	2004-11-28 22:39:05

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.dg: intmax_t-1.c 

Log message:
	PR target/18345
	* gcc.dg/intmax_t-1.c: Add mmix-*-* to dg-error.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4667&r2=1.4668
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/intmax_t-1.c.diff?cvsroot=gcc&r1=1.2&r2=1.3

Comment 4 Hans-Peter Nilsson 2004-11-28 22:43:01 UTC
Look for "Committed, gcc.dg/intmax_t-1.c: Add mmix-*-* to dg-error. PR
target/18345." at <URL:http://gcc.gnu.org/ml/gcc-patches/2004-11/>.