Bug 40701 - [4.5/4.6 regression] Many libffi tests fail to compile on Tru64 UNIX
Summary: [4.5/4.6 regression] Many libffi tests fail to compile on Tru64 UNIX
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libffi (show other bugs)
Version: 4.5.0
: P4 normal
Target Milestone: 4.5.0
Assignee: Rainer Orth
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-07-09 18:44 UTC by Rainer Orth
Modified: 2010-04-22 16:48 UTC (History)
1 user (show)

See Also:
Host: alpha-dec-osf*
Target: alpha-dec-osf*
Build: alpha-dec-osf*
Known to work:
Known to fail:
Last reconfirmed: 2010-04-22 16:47:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2009-07-09 18:44:01 UTC
Between 20090522 and 20090612, many libffi tests started to fail on alpha-dec-osf4.0f:

FAIL: libffi.call/closure_fn0.c -O0 -W -Wall (test for excess errors)
Excess errors:
In file included from /vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/closure_fn0.c:13:0:
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/ffitest.h:6:22: fatal error: inttypes.h: No such file or directory
compilation terminated.

WARNING: libffi.call/closure_fn0.c -O0 -W -Wall compilation failed to produce executable

It is clearly wrong to unconditionally use <inttypes.h>.  One might consider
using <stdint.h> for in-tree use, which is now always provided by GCC, but this
would be wrong for the external libffi either.

alpha-dec-osf5.1b is not that heavily affected, since it has <inttypes.h>, but
that one unfortunately lacks PRIuPTR:

FAIL: libffi.call/cls_align_pointer.c -O0 -W -Wall (test for excess errors)
Excess errors:
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c: In function 'cls_struct_align_fn':
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c:25:17: error: expected ')' before 'PRIuPTR'
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c:29:3: warning: too few arguments for format
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c: In function 'main':
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c:84:22: error: expected ')' before 'PRIuPTR'
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c:84:22: warning: too few arguments for format
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c:91:22: error: expected ')' before 'PRIuPTR'
/vol/gcc/src/gcc-dist/libffi/testsuite/libffi.call/cls_align_pointer.c:91:22: warning: too few arguments for format

WARNING: libffi.call/cls_align_pointer.c -O0 -W -Wall compilation failed to produce executable

The definition of PRIuPTR in intl/loadmsgcat.c might be an option here.
Comment 1 Joseph S. Myers 2009-07-29 22:55:04 UTC
Tru64 is not a primary or secondary target so setting to P4.
Comment 2 Rainer Orth 2010-01-07 20:35:48 UTC
Subject: Bug 40701

Author: ro
Date: Thu Jan  7 20:35:33 2010
New Revision: 155710

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155710
Log:
	PR libffi/40701
	* testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
	PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
	* testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
	alpha*-dec-osf*.
	* testsuite/libffi.call/cls_align_uint64.c: Likewise.
	* testsuite/libffi.call/cls_ulonglong.c: Likewise.
	* testsuite/libffi.call/return_ll1.c: Likewise.
	* testsuite/libffi.call/stret_medium2.c: Likewise.
	* testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
	MAP_FAILED to char *.

Modified:
    trunk/libffi/ChangeLog
    trunk/libffi/testsuite/libffi.call/cls_align_sint64.c
    trunk/libffi/testsuite/libffi.call/cls_align_uint64.c
    trunk/libffi/testsuite/libffi.call/cls_ulonglong.c
    trunk/libffi/testsuite/libffi.call/ffitest.h
    trunk/libffi/testsuite/libffi.call/return_ll1.c
    trunk/libffi/testsuite/libffi.call/stret_medium2.c
    trunk/libffi/testsuite/libffi.special/ffitestcxx.h

Comment 3 Richard Biener 2010-04-06 11:20:25 UTC
GCC 4.5.0 is being released.  Deferring to 4.5.1.
Comment 4 Rainer Orth 2010-04-22 16:47:09 UTC
Mine.
Comment 5 Rainer Orth 2010-04-22 16:48:06 UTC
Fixed by patch above.