diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2022-11-28 13:49:06 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2024-10-07 10:13:11 +0200 |
commit | 65c7616c251a6697134b2a3ac7fe6460d308d2ed (patch) | |
tree | 75afd6f29016b2041bace4de5774ee63568efada /gcc/fortran/io.cc | |
parent | cb633e5cbd422d5a5d98b17d435abad976a9d9ca (diff) | |
download | gcc-65c7616c251a6697134b2a3ac7fe6460d308d2ed.zip gcc-65c7616c251a6697134b2a3ac7fe6460d308d2ed.tar.gz gcc-65c7616c251a6697134b2a3ac7fe6460d308d2ed.tar.bz2 |
nvptx: Disable effective-target 'freestanding'
After 2014's commit 157e859ffe3b5d43db1e19475711c1a3d21ab57a "remove picochip",
the effective-target 'freestanding' (later) was only ever used for nvptx.
However, the relevant I/O library functions have long been implemented in nvptx
newlib.
These test cases generally PASS, just a few need to get XFAILed; see
<https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/#system-calls>,
and then supposedly
<https://docs.nvidia.com/cuda/cuda-c-programming-guide/#formatted-output> for
description of the non-standard PTX 'vprintf' return value:
> Unlike the C-standard 'printf()', which returns the number of characters
> printed, CUDA's 'printf()' returns the number of arguments parsed. If no
> arguments follow the format string, 0 is returned. If the format string is
> NULL, -1 is returned. If an internal error occurs, -2 is returned.
(I've tried a few variants to confirm that PTX 'vprintf' -- which supposedly is
underlying the CUDA 'printf' -- is what's implementing this behavior.)
Probably, we ought to fix that up in nvptx newlib.
gcc/testsuite/
* gcc.c-torture/execute/printf-1.c: XFAIL for nvptx.
* gcc.c-torture/execute/printf-chk-1.c: Likewise.
* gcc.c-torture/execute/vprintf-1.c: Likewise.
* gcc.c-torture/execute/vprintf-chk-1.c: Likewise.
* lib/target-supports.exp (check_effective_target_freestanding):
Disable for nvptx.
Diffstat (limited to 'gcc/fortran/io.cc')
0 files changed, 0 insertions, 0 deletions