diff mbox

[committed] add C99 runtime requirement to a couple of tests

Message ID 88fd1661-ea4b-01ab-0fa9-4e24f5b77395@gmail.com
State New
Headers show

Commit Message

Martin Sebor Jan. 10, 2017, 10:55 p.m. UTC
The three bugs below point test failures in a couple of the printf
tests due to them exercising C99 features not present in the default
runtime on the targets (the h and hh length modifiers on HP-UX 11.11
and the a format specifier in Newlib).  As suggested in PR 78959,
the attached patch committed in r244298 adds
the { dg-require-effective-target c99_runtime } directive to make
the tests conditional on support for those features.

Martin

PR testsuite/78960 - FAIL: gcc.dg/tree-ssa/builtin-sprintf.c execution test
PR testsuite/78959 - FAIL: gcc.c-torture/execute/pr78622.c
PR testsuite/78133 - Commit r241489 adds printf specifiers not supported by
newlib
diff mbox

Patch

ndex: gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c	(revision 244297)
+++ gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c	(revision 244298)
@@ -3,8 +3,10 @@ 
    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-additional-options "-O2 -Wall -Wno-pedantic -fprintf-return-value" } */
+/* { dg-do run }
+   The h and hh length modifiers are a C99 feature (see PR 78959).
+   { dg-require-effective-target c99_runtime }
+   { dg-additional-options "-O2 -Wall -Wno-pedantic -fprintf-return-value" } */
 
 #ifndef LINE
 #  define LINE   0
Index: gcc/testsuite/gcc.dg/tree-ssa/pr78622.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr78622.c	(revision 244297)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr78622.c	(revision 244298)
@@ -1,7 +1,9 @@ 
 /* PR middle-end/78622 - [7 Regression] -Wformat-length/-fprintf-return-value
    incorrect with overflow/wrapping
    { dg-do compile }
-   { dg-options "-Wformat-length=2" } */
+   { dg-options "-Wformat-length=2" }
+   The h and hh length modifiers are a C99 feature (see PR 78959).
+   { dg-require-effective-target c99_runtime }  */
 
 char buf[1];