]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] Require c99_runtime to run builtin-sprintf.c
authorTom de Vries <tdevries@suse.de>
Mon, 7 Feb 2022 13:45:12 +0000 (14:45 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 8 Feb 2022 08:55:23 +0000 (09:55 +0100)
On nvptx, I run into an execution failure in test-case
gcc.dg/tree-ssa/builtin-sprintf.c because the test-case uses the 'hh'
modifier.

The port uses newlib, which does by default not support that modifier.
There's a configure option --enable-newlib-io-c99-formats to enable this
support, but that requires alloca support, which nvptx doesn't have.

Fix this by requiring c99_runtime for running the test-case.

Tested on nvptx.

gcc/testsuite/ChangeLog:

2022-02-07  Tom de Vries  <tdevries@suse.de>

* gcc.dg/tree-ssa/builtin-sprintf.c: Require c99_runtime for
dg-do run.

gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c

index f90558e9b7ee9905e2faadaa81357b47029f80e7..9368a2e0e50a27741e36a9dff3aebe7a3fb41e0f 100644 (file)
@@ -3,7 +3,8 @@
    constant folding.  With optimization enabled the test will fail to
    link if any of the assertions fails.  Without optimization the test
    aborts at runtime if any of the assertions fails.  */
-/* { dg-do run } */
+/* { dg-do run { target c99_runtime } } */
+/* { dg-do link { target { ! c99_runtime } } } */
 /* { dg-skip-if "not IEEE float layout" { "pdp11-*-*" } } */
 /* { dg-additional-options "-O2 -Wall -Wno-pedantic -fprintf-return-value" } */