The tests for the cxx2a version of contracts disabled run variants for
non-hosted platforms.  This patch does the same for the c++26 version.
Tested on x86-64-darwin and x86_64, powerpc64le-linux. 
OK for trunk?
thanks
Iain

--- 8< ---

These, in general, require hosted support.

gcc/testsuite/ChangeLog:

        * g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C: Skip
        for non-hosted.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p17.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p4.C: Likewise.
        * g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C: Likewise.
        * g++.dg/contracts/cpp26/callerside-checks/callerside-checks-all.C: 
Likewise.
        * g++.dg/contracts/cpp26/callerside-checks/callerside-checks-none.C: 
Likewise.
        * g++.dg/contracts/cpp26/callerside-checks/callerside-checks-pre.C: 
Likewise.
        * g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-post.C: 
Likewise.
        * g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C: 
Likewise.
        * g++.dg/contracts/cpp26/contract-assert-run.C: Likewise.
        * g++.dg/contracts/cpp26/contract-violation-noexcept2.C: Likewise.
        * g++.dg/contracts/cpp26/debug-and-opt.C: Likewise.
        * g++.dg/contracts/cpp26/deferred1.C: Likewise.
        * 
g++.dg/contracts/cpp26/definition-checks/contract-assert-no-def-check.C: 
Likewise.
        * g++.dg/contracts/cpp26/dependent_contract.C: Likewise.
        * g++.dg/contracts/cpp26/empty-nt-param.C: Likewise.
        * g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C: Likewise.
        * g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C: Likewise.
        * g++.dg/contracts/cpp26/function-contract-specifier-seq.C: Likewise.
        * g++.dg/contracts/cpp26/name_mangling.C: Likewise.
        * g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-post.C: 
Likewise.
        * g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-pre.C: 
Likewise.
        * g++.dg/contracts/cpp26/outline-checks/func-noexcept-assert.C: 
Likewise.
        * g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-post.C: 
Likewise.
        * g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C: 
Likewise.
        * g++.dg/contracts/cpp26/src-loc-0.C: Likewise.
        * g++.dg/contracts/cpp26/src-loc-1.C: Likewise.
        * g++.dg/contracts/cpp26/src-loc-2.C: Likewise.
        * g++.dg/contracts/cpp26/throwing-violation-handler.cc: Likewise.
        * g++.dg/contracts/cpp26/vaargs.C: Likewise.

Signed-off-by: Iain Sandoe <[email protected]>
---
 .../g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C   | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C         | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C         | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C         | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C         | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C  | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C   | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C      | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C      | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C      | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17.C | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p4.C  | 1 +
 .../g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C    | 1 -
 .../contracts/cpp26/callerside-checks/callerside-checks-all.C  | 2 +-
 .../contracts/cpp26/callerside-checks/callerside-checks-none.C | 2 ++
 .../contracts/cpp26/callerside-checks/callerside-checks-pre.C  | 1 +
 .../contracts/cpp26/callerside-checks/freefunc-noexcept-post.C | 1 +
 .../contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C  | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/contract-assert-run.C     | 1 +
 .../g++.dg/contracts/cpp26/contract-violation-noexcept2.C      | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/debug-and-opt.C           | 2 +-
 gcc/testsuite/g++.dg/contracts/cpp26/deferred1.C               | 1 +
 .../cpp26/definition-checks/contract-assert-no-def-check.C     | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/dependent_contract.C      | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/empty-nt-param.C          | 1 +
 .../g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C          | 1 +
 .../g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C          | 1 +
 .../g++.dg/contracts/cpp26/function-contract-specifier-seq.C   | 1 -
 gcc/testsuite/g++.dg/contracts/cpp26/name_mangling.C           | 2 +-
 .../contracts/cpp26/outline-checks/freefunc-noexcept-post.C    | 1 +
 .../contracts/cpp26/outline-checks/freefunc-noexcept-pre.C     | 1 +
 .../contracts/cpp26/outline-checks/func-noexcept-assert.C      | 1 +
 .../contracts/cpp26/outline-checks/memberfunc-noexcept-post.C  | 1 +
 .../contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C   | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/src-loc-0.C               | 2 +-
 gcc/testsuite/g++.dg/contracts/cpp26/src-loc-1.C               | 3 ++-
 gcc/testsuite/g++.dg/contracts/cpp26/src-loc-2.C               | 3 ++-
 .../g++.dg/contracts/cpp26/throwing-violation-handler.cc       | 1 +
 gcc/testsuite/g++.dg/contracts/cpp26/vaargs.C                  | 1 +
 39 files changed, 40 insertions(+), 8 deletions(-)

diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C
index e97f1200c09..7ca6199ef4c 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p11-observe.C
@@ -10,6 +10,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts 
-fcontract-evaluation-semantic=observe" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int f(int i, int j = 1) pre(i > 0) post(r: r < 5)
 {
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C
index 19144b6b857..a643cc7d29d 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-2.C
@@ -7,6 +7,7 @@
 // invoked (14.6.2). — end note]
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C
index 682e55ac18c..cc0c0e7f5e9 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-3.C
@@ -6,6 +6,7 @@
 // for a handler continues from the execution of that statement. — end note]
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C
index 50a59b90b2e..5ac94e29f5f 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-4.C
@@ -10,6 +10,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C
index b48151f1195..aca89a819cd 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-5.C
@@ -10,6 +10,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C
index 39fc55ad3cc..2aaf13781f8 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-post.C
@@ -11,6 +11,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C
index 6297571fdb4..378b93d2bbc 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF-pre.C
@@ -11,6 +11,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C
index 1f55f4cca26..eccef309f4b 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF2.C
@@ -10,6 +10,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C
index 605cbc277b4..6a364eb1ffd 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF3.C
@@ -10,6 +10,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C
index 2b787753cab..0f4991cda3e 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17-SMF4.C
@@ -11,6 +11,7 @@
 //
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17.C
index 0f33722248c..01db74ee4fd 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p17.C
@@ -7,6 +7,7 @@
 // invoked (14.6.2). — end note]
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p4.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p4.C
index eb8f2d85ce6..386c98502f0 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p4.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p4.C
@@ -4,6 +4,7 @@
 // [Note 2 : The predicate is potentially evaluated (6.3), but not evaluated. 
— end note]
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=ignore" 
}
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C
index 7f05fd8be1a..a3ee0a5a029 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/basic.contract.eval.p6.observe.C
@@ -6,7 +6,6 @@
 // { dg-do compile { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fdump-tree-gimple " }
 
-
 int main(int ac, char *av[])
 {
    int i = ac;
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-all.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-all.C
index 07c09321c40..43805721b07 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-all.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-all.C
@@ -1,6 +1,6 @@
 // { dg-do run { target c++20 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontracts-client-check=all" }
-
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 
 int f(const int a, const int b) pre (a > 2) post(r : r > 2){ return b;  }
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-none.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-none.C
index 22e0ded4241..ae3acac6079 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-none.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-none.C
@@ -1,5 +1,7 @@
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontracts-client-check=none" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
+
 static int pre_check = 0;
 bool fpre()
 {
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-pre.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-pre.C
index 1a3a693e3ab..14453870f08 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-pre.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/callerside-checks-pre.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontracts-client-check=pre" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 static int pre_check = 0;
 bool fpre()
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-post.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-post.C
index 99c080f52db..bc944b5c65c 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-post.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-post.C
@@ -4,6 +4,7 @@
 // with caller side checks.
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontracts-client-check=all " }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <iostream>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C
index 7e3968b453b..25d7ec0bbe3 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/callerside-checks/freefunc-noexcept-pre.C
@@ -4,6 +4,7 @@
 // with caller side checks.
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontracts-client-check=all " }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <iostream>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/contract-assert-run.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/contract-assert-run.C
index 760bd36c275..6295d932dac 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/contract-assert-run.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/contract-assert-run.C
@@ -9,6 +9,7 @@
 //   ensure that a missing colon after contract role errors
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts 
-fcontract-evaluation-semantic=observe" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <iostream>
 #include <contracts>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/contract-violation-noexcept2.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/contract-violation-noexcept2.C
index 8f41a4f8e46..42739db0263 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/contract-violation-noexcept2.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/contract-violation-noexcept2.C
@@ -2,6 +2,7 @@
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts" }
 // { dg-additional-sources "throwing-violation-handler.cc" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <exception>
 
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/debug-and-opt.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/debug-and-opt.C
index 0d6fa197895..fbc7b11c3f9 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/debug-and-opt.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/debug-and-opt.C
@@ -1,7 +1,7 @@
 // Check that we do not ICE with debug + optimisation.
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-O -g" }
-
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int foo (const int i)
   pre (i > 3)
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/deferred1.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/deferred1.C
index 165f8eded78..2a8d26e600d 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/deferred1.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/deferred1.C
@@ -2,6 +2,7 @@
 // For now, diagnose that we at least don't accidentally merge the contracts
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -g3" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 #include <cassert>
 struct contract
 {
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/definition-checks/contract-assert-no-def-check.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/definition-checks/contract-assert-no-def-check.C
index 74d743b38e1..75b1888e262 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/definition-checks/contract-assert-no-def-check.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/definition-checks/contract-assert-no-def-check.C
@@ -2,6 +2,7 @@
 // are turned off
 // { dg-do run { target c++26 } }
 // { dg-options "-fcontracts -fcontracts-definition-check=off 
-fcontract-evaluation-semantic=observe" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <cstdlib>
 
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/dependent_contract.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/dependent_contract.C
index e4f35c13b8d..73d880afc3c 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/dependent_contract.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/dependent_contract.C
@@ -1,6 +1,7 @@
 // check that dependent contract check does not cause an ICE
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 template <typename ST>
 struct S{
 
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/empty-nt-param.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/empty-nt-param.C
index ab92144eacd..44392eb1934 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/empty-nt-param.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/empty-nt-param.C
@@ -1,6 +1,7 @@
 // check that we do not ICE with an empty nontrivial parameter
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-checks-outlined" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 struct NTClass {
   NTClass(){};
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C
index 93ab26e13a4..6e8d23d4368 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-3.C
@@ -8,6 +8,7 @@
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-checks-outlined" }
 // { dg-xfail-run-if "PRXXXXXX" { *-*-* } }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 struct S{
   S(){};
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C
index c9cdbe51702..45c9fdbf210 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/expr.prim.id.unqual.p7-4.C
@@ -8,6 +8,7 @@
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-O2 -g" }
 // { dg-xfail-run-if "PRXXXXXX" { *-*-* } { "-fcontract-checks-outlined" } "" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <cassert>
 
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/function-contract-specifier-seq.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/function-contract-specifier-seq.C
index 51560268f23..f6bbe638742 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/function-contract-specifier-seq.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/function-contract-specifier-seq.C
@@ -10,7 +10,6 @@
 //     post attribute-specifier-seq opt ( result-name-introducer opt 
conditional-expression )
 // { dg-do compile { target c++23 } }
 // { dg-additional-options "-fcontracts" }
-// { dg-additional-options "-fcontracts" }
 
 static_assert (__cpp_contracts >= 202502L);
 
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/name_mangling.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/name_mangling.C
index 1e81c1247a1..3df9112eb25 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/name_mangling.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/name_mangling.C
@@ -3,7 +3,7 @@
 // additional parameter that matches the returen value of the first function
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
-
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int f() post(r:r>1){ return 2;}
 void f(int i) post(true){ }
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-post.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-post.C
index 48b752bcefa..5fe807dee55 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-post.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-post.C
@@ -3,6 +3,7 @@
 // This tests the behaviour of a pre condition on a member function
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontract-checks-outlined" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-pre.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-pre.C
index a662734d62d..ea94369a7df 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-pre.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/freefunc-noexcept-pre.C
@@ -3,6 +3,7 @@
 // This tests the behaviour of a pre condition on a member function
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontract-checks-outlined" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/func-noexcept-assert.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/func-noexcept-assert.C
index f2bc62c432c..a4a5a5c88bf 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/func-noexcept-assert.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/func-noexcept-assert.C
@@ -2,6 +2,7 @@
 // can be caught by the function.
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontract-checks-outlined" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-post.C
 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-post.C
index 536f7095f4c..e689f4c33bb 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-post.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-post.C
@@ -3,6 +3,7 @@
 // This tests the behaviour of a post condition on a member function
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontract-checks-outlined" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C
index f629587ae26..787cc506fd4 100644
--- 
a/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C
+++ 
b/gcc/testsuite/g++.dg/contracts/cpp26/outline-checks/memberfunc-noexcept-pre.C
@@ -3,6 +3,7 @@
 // This tests the behaviour of a pre condition on a member function
 // { dg-do run { target c++26 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
-fcontract-checks-outlined" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 #include <contracts>
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-0.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-0.C
index 025a8fac459..e3a722fa2e1 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-0.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-0.C
@@ -1,6 +1,6 @@
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
-
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // Test source location without including <source_location>
 
 int
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-1.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-1.C
index 0987d0e62dd..dcde9f84be3 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-1.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-1.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // Test source location with #include <source_location>
 #include <source_location>
 
@@ -15,4 +16,4 @@ int main ()
   foo (9);
 }
 
-// { dg-output "contract violation in function int foo.int. at .*:8: x > 
10.*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function int foo.int. at .*:9: x > 
10.*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-2.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-2.C
index c1ff148f92f..fa67fb80c65 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-2.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/src-loc-2.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=observe 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 // Test source location with a late inclusion of <source_location>
 
@@ -17,4 +18,4 @@ int main ()
   foo (9);
 }
 
-// { dg-output "contract violation in function int foo.int. at .*:8: x > 
10.*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function int foo.int. at .*:9: x > 
10.*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/throwing-violation-handler.cc 
b/gcc/testsuite/g++.dg/contracts/cpp26/throwing-violation-handler.cc
index da0686ebc71..06c4ba4801c 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/throwing-violation-handler.cc
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/throwing-violation-handler.cc
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 #include <contracts>
 
 void handle_contract_violation(const std::contracts::contract_violation&)
diff --git a/gcc/testsuite/g++.dg/contracts/cpp26/vaargs.C 
b/gcc/testsuite/g++.dg/contracts/cpp26/vaargs.C
index abb3ded7c07..c7438eb9f11 100644
--- a/gcc/testsuite/g++.dg/contracts/cpp26/vaargs.C
+++ b/gcc/testsuite/g++.dg/contracts/cpp26/vaargs.C
@@ -1,6 +1,7 @@
 // Check contract assertion on a vaarg function
 // { dg-do run { target c++23 } }
 // { dg-additional-options "-fcontracts -fcontract-evaluation-semantic=enforce 
" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 #include <stdio.h>
 #include <stdarg.h>
 int simple_printf(const char* fmt, ...) pre (fmt != 0) post (r: r > 0)
-- 
2.50.1 (Apple Git-155)

Reply via email to