I'm not quite that sure about the general applicability of these, as
these depend somewhat on code size. Although there might be something
we can prove about a minimum frame size for one test or the other at -O0.
I also tried to add
/* { dg-skip-if "memory tight" { !size20plus } { "-O3" } } */
and
/* { dg-require-effective-target size20plus } */
to gcc.c-torture/execute/builtins/snprintf-chk.c , but to no avail.
2024-07-15 Joern Rennecke <[email protected]>
testsuite/
* gcc.c-torture/execute/20021120-1.c: Skip if not size20plus of -Os.
* gcc.dg/fixed-point/convert-float-4.c: Require size20plus.
* gcc.dg/torture/pr112282.c: Skip if -O0 unless size20plus.
* g++.dg/lookup/pr21802.C: Require size20plus.
--- 14.2.0/gcc/testsuite/gcc.c-torture/execute/20021120-1.c 2024-08-06
15:14:33.216206266 +0100
+++ gcc.c-torture/execute/20021120-1.c 2024-07-15 22:18:59.420561665 +0100
@@ -1,3 +1,5 @@
+/* { dg-skip-if "memory tight" { ! size20plus } { "*" } { "-Os" } } */
+
void abort (void);
void exit (int);
--- 14.2.0/gcc/testsuite/gcc.dg/fixed-point/convert-float-4.c 2024-08-06
15:14:39.879167199 +0100
+++ gcc.dg/fixed-point/convert-float-4.c 2024-07-15 21:45:33.723467803
+0100
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-options "-std=gnu99 -O0" } */
+/* { dg-require-effective-target size20plus } */
/* C99 6.3 Conversions.
--- 14.2.0/gcc/testsuite/gcc.dg/torture/pr112282.c 2024-08-06
15:14:34.290199969 +0100
+++ gcc.dg/torture/pr112282.c 2024-07-15 22:18:08.216211254 +0100
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "memory tight" { ! size20plus } { "-O0" } } */
#if __SIZEOF_INT__ < 4
#define Xint __INT32_TYPE__
--- 14.2.0/gcc/testsuite/g++.dg/lookup/pr21802.C 2024-08-06
15:14:29.829226124 +0100
+++ g++.dg/lookup/pr21802.C 2024-07-15 22:49:08.123428467 +0100
@@ -1,5 +1,6 @@
// PR c++/21802
// { dg-do run }
+// { dg-require-effective-target size20plus }
#include <cassert>
struct X;