[committed, PR83737] Set use_gcc_stdint=wrap for nvptx

Tom de Vries Tom_deVries@mentor.com
Fri Jan 12 17:46:00 GMT 2018


Hi,

atm, for nvptx we have the following failure:
...
FAIL: gcc.dg/stdint-width-1.c (test for excess errors)
...

In more detail:
...
gcc/testsuite/gcc.dg/stdint-width-1.c:20:4: error: #error "missing 
INT8_WIDTH"
...

The test fails because newlib's stdint.h lacks TS 18661-1 support.

The test deliberately uses -ffreestanding so that any
configurations using GCC's stdint.h for freestanding compilations have 
no problems with system stdint.h lacking TS 18661-1 support. But GCC 
stdint.h is not used for nvptx, because use_gcc_stdint defaults to 
"none" in config.gcc.

The patch fixes the test failure by setting use_gcc_stdint=wrap for 
nvptx, so that GCC's stdint.h includes libc's for hosted compilations 
but GCC's own for freestanding compilations.

Build and reg-tested on nvptx.
Build on x86_64 with nvptx accelerator and tested libgomp.

Committed.

Thanks,
- Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-use_gcc_stdint-wrap-for-nvptx.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180112/3e30251b/attachment.bin>


More information about the Gcc-patches mailing list