public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* testsuite: introduce hostedlib effective target
@ 2023-11-02  1:11 Alexandre Oliva
  2023-11-05 20:40 ` Mike Stump
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandre Oliva @ 2023-11-02  1:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: Rainer Orth, Mike Stump

Several C++ tests fail with --disable-hosted-libstdcxx, whether
because stdc++ext gets linked in despite not being built, because
standard headers are included but that are unavailable in this mode,
or because headers are (mistakenly?) expected to introduce
declarations such as for ::abort, but in this mode they don't.

This patch introduces an effective target for GCC test, equivalent to
one that's available in the libstdc++-v3 testsuite, and arranges for
all such tests to be skipped when libstdc++-v3 is not hosted.

This patch was tested with arm-eabi, with libstdc++-v3 configured with
--disable-hosted-libstdcxx, on gcc-13, and with x86_64-linux-gnu
likewise on trunk.  In the latter, there are a number of additional
fails that appear to be related, and that I'm yet to investigate, but
this is big enough already, so I figured I'd post this and see whether
the approach is regarded as sound and acceptable before proceeding any
further.  WDYT?  Ok to install, to deal with other targets
incrementally?


for  gcc/ChangeLog

	* doc/sourcebuild.texi (hostedlib): New effective target.

for  gcc/testsuite/ChangeLog

	* lib/target-supports.exp (check_effective_target_hostedlib):
	New.
	* g++.dg/contracts/contracts-access1.C: Skip if !hostedlib
	because of libstdc++exp.
	* g++.dg/contracts/contracts-assume3.C: Likewise.
	* g++.dg/contracts/contracts-assume4.C: Likewise.
	* g++.dg/contracts/contracts-config1.C: Likewise.
	* g++.dg/contracts/contracts-constexpr1.C: Likewise.
	* g++.dg/contracts/contracts-deduced2.C: Likewise.
	* g++.dg/contracts/contracts-externC.C: Likewise.
	* g++.dg/contracts/contracts-friend1.C: Likewise.
	* g++.dg/contracts/contracts-multiline1.C: Likewise.
	* g++.dg/contracts/contracts-nested-class2.C: Likewise.
	* g++.dg/contracts/contracts-post2.C: Likewise.
	* g++.dg/contracts/contracts-post3.C: Likewise.
	* g++.dg/contracts/contracts-pre2a2.C: Likewise.
	* g++.dg/contracts/contracts10.C: Likewise.
	* g++.dg/contracts/contracts18.C: Likewise.
	* g++.dg/contracts/contracts19.C: Likewise.
	* g++.dg/contracts/contracts2.C: Likewise.
	* g++.dg/contracts/contracts24.C: Likewise.
	* g++.dg/contracts/contracts25.C: Likewise.
	* g++.dg/contracts/contracts3.C: Likewise.
	* g++.dg/contracts/contracts4.C: Likewise.
	* g++.dg/contracts/contracts5.C: Likewise.
	* g++.dg/contracts/contracts6.C: Likewise.
	* g++.dg/contracts/contracts7.C: Likewise.
	* g++.dg/contracts/contracts9.C: Likewise.
	* g++.dg/pch/system-1.C: Skip if !hostedlib because of
	unavailable headers.
	* g++.dg/pch/system-2.C: Likewise.
	* c-c++-common/pr36513-2.c: Likewise.
	* g++.dg/analyzer/pr93212.C: Likewise.
	* g++.dg/concepts/expression.C: Likewise.
	* g++.dg/concepts/fn3.C: Likewise.
	* g++.dg/concepts/fn9.C: Likewise.
	* g++.dg/concepts/generic-fn.C: Likewise.
	* g++.dg/concepts/intro2.C: Likewise.
	* g++.dg/contracts/contracts-assume2.C: Likewise.
	* g++.dg/contracts/contracts-ignore2.C: Likewise.
	* g++.dg/contracts/contracts-pre10.C: Likewise.
	* g++.dg/contracts/contracts-pre2.C: Likewise.
	* g++.dg/contracts/contracts-pre3.C: Likewise.
	* g++.dg/contracts/contracts-pre4.C: Likewise.
	* g++.dg/contracts/contracts-pre5.C: Likewise.
	* g++.dg/contracts/contracts-pre7.C: Likewise.
	* g++.dg/contracts/contracts-pre9.C: Likewise.
	* g++.dg/contracts/contracts-redecl3.C: Likewise.
	* g++.dg/contracts/contracts-redecl4.C: Likewise.
	* g++.dg/contracts/contracts-redecl6.C: Likewise.
	* g++.dg/contracts/contracts-redecl7.C: Likewise.
	* g++.dg/contracts/contracts-tmpl-spec1.C: Likewise.
	* g++.dg/contracts/contracts-tmpl-spec2.C: Likewise.
	* g++.dg/contracts/contracts-tmpl-spec3.C: Likewise.
	* g++.dg/contracts/contracts14.C: Likewise.
	* g++.dg/contracts/contracts15.C: Likewise.
	* g++.dg/contracts/contracts16.C: Likewise.
	* g++.dg/contracts/contracts17.C: Likewise.
	* g++.dg/contracts/contracts22.C: Likewise.
	* g++.dg/contracts/contracts35.C: Likewise.
	* g++.dg/coroutines/pr100611.C: Likewise.
	* g++.dg/coroutines/pr101367.C: Likewise.
	* g++.dg/coroutines/pr101976.C: Likewise.
	* g++.dg/coroutines/pr102454.C: Likewise.
	* g++.dg/coroutines/pr104051.C: Likewise.
	* g++.dg/coroutines/pr94288.C: Likewise.
	* g++.dg/coroutines/pr95520.C: Likewise.
	* g++.dg/coroutines/pr97587.C: Likewise.
	* g++.dg/coroutines/pr99576_1.C: Likewise.
	* g++.dg/coroutines/pr99576_2.C: Likewise.
	* g++.dg/coroutines/torture/co-await-16-template-traits.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-15-default-return_void.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-04-complex-local-state.C: Likewise.
	* g++.dg/coroutines/torture/func-params-08.C: Likewise.
	* g++.dg/coroutines/torture/func-params-09-awaitable-parms.C: Likewise.
	* g++.dg/coroutines/torture/local-var-05-awaitable.C: Likewise.
	* g++.dg/coroutines/torture/pr98704.C: Likewise.
	* g++.dg/cpp0x/Wliteral-suffix.C: Likewise.
	* g++.dg/cpp0x/Wpessimizing-move2.C: Likewise.
	* g++.dg/cpp0x/constexpr-70001-3.C: Likewise.
	* g++.dg/cpp0x/constexpr-ice16.C: Likewise.
	* g++.dg/cpp0x/dc5.C: Likewise.
	* g++.dg/cpp0x/enum35.C: Likewise.
	* g++.dg/cpp0x/enum36.C: Likewise.
	* g++.dg/cpp0x/initlist-opt1.C: Likewise.
	* g++.dg/cpp0x/initlist-vect2.C: Likewise.
	* g++.dg/cpp0x/initlist13.C: Likewise.
	* g++.dg/cpp0x/initlist15.C: Likewise.
	* g++.dg/cpp0x/initlist25.C: Likewise.
	* g++.dg/cpp0x/initlist54.C: Likewise.
	* g++.dg/cpp0x/initlist92.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-capture-const-ref.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-const-neg.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-const.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-deduce.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-in-class-neg.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-in-class.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-mixed.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-mutable.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-nested.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-non-const.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-nop.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-nullptr.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-pass.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-recursive.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-ref-default.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-ref.C: Likewise.
	* g++.dg/cpp0x/nullptr20.C: Likewise.
	* g++.dg/cpp0x/pr61038.C: Likewise.
	* g++.dg/cpp0x/rv-trivial-bug.C: Likewise.
	* g++.dg/cpp0x/udlit-concat-neg.C: Likewise.
	* g++.dg/cpp0x/udlit-concat.C: Likewise.
	* g++.dg/cpp0x/udlit-embed-quote.C: Likewise.
	* g++.dg/cpp0x/udlit-general.C: Likewise.
	* g++.dg/cpp0x/udlit-namespace.C: Likewise.
	* g++.dg/cpp0x/udlit-raw-op.C: Likewise.
	* g++.dg/cpp0x/udlit-raw-str.C: Likewise.
	* g++.dg/cpp0x/udlit-resolve-char8_t.C: Likewise.
	* g++.dg/cpp0x/udlit-resolve.C: Likewise.
	* g++.dg/cpp0x/udlit-sfinae.C: Likewise.
	* g++.dg/cpp0x/udlit-suffix-neg.C: Likewise.
	* g++.dg/cpp0x/udlit-template.C: Likewise.
	* g++.dg/cpp0x/variadic-bind.C: Likewise.
	* g++.dg/cpp0x/variadic-function.C: Likewise.
	* g++.dg/cpp0x/variadic-mem_fn.C: Likewise.
	* g++.dg/cpp0x/variadic-tuple.C: Likewise.
	* g++.dg/cpp1y/auto-fn45.C: Likewise.
	* g++.dg/cpp1y/complex_literals1.C: Likewise.
	* g++.dg/cpp1y/complex_literals1a.C: Likewise.
	* g++.dg/cpp1y/constexpr-66093.C: Likewise.
	* g++.dg/cpp1y/constexpr-assert1.C: Likewise.
	* g++.dg/cpp1y/constexpr-assert2.C: Likewise.
	* g++.dg/cpp1y/lambda-generic-69078-2.C: Likewise.
	* g++.dg/cpp1y/lambda-generic-x.C: Likewise.
	* g++.dg/cpp1y/lambda-init8.C: Likewise.
	* g++.dg/cpp1y/new2.C: Likewise.
	* g++.dg/cpp1y/nsdmi-aggr12.C: Likewise.
	* g++.dg/cpp1y/pr57640.C: Likewise.
	* g++.dg/cpp1y/pr77786.C: Likewise.
	* g++.dg/cpp1y/pr95226.C: Likewise.
	* g++.dg/cpp1y/udlit-char-template-sfinae.C: Likewise.
	* g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C: Likewise.
	* g++.dg/cpp1z/class-deduction14.C: Likewise.
	* g++.dg/cpp1z/decomp37.C: Likewise.
	* g++.dg/cpp1z/eval-order2.C: Likewise.
	* g++.dg/cpp1z/fold1.C: Likewise.
	* g++.dg/cpp1z/init-statement6.C: Likewise.
	* g++.dg/cpp1z/launder3.C: Likewise.
	* g++.dg/cpp1z/launder4.C: Likewise.
	* g++.dg/cpp1z/launder5.C: Likewise.
	* g++.dg/cpp1z/launder6.C: Likewise.
	* g++.dg/cpp1z/utf8.C: Likewise.
	* g++.dg/cpp2a/concepts-cmath.C: Likewise.
	* g++.dg/cpp2a/concepts-explicit-spec1.C: Likewise.
	* g++.dg/cpp2a/concepts-explicit-spec4.C: Likewise.
	* g++.dg/cpp2a/concepts-explicit-spec5.C: Likewise.
	* g++.dg/cpp2a/concepts-memfun.C: Likewise.
	* g++.dg/cpp2a/concepts-pr67774.C: Likewise.
	* g++.dg/cpp2a/cond-triv2.C: Likewise.
	* g++.dg/cpp2a/nontype-float1.C: Likewise.
	* g++.dg/diagnostic/disable.C: Likewise.
	* g++.dg/diagnostic/pr65923.C: Likewise.
	* g++.dg/eh/arm-vfp-unwind.C: Likewise.
	* g++.dg/eh/crossjump1.C: Likewise.
	* g++.dg/eh/omit-frame-pointer.C: Likewise.
	* g++.dg/eh/simd-3.C: Likewise.
	* g++.dg/ext/bases.C: Likewise.
	* g++.dg/ext/builtin-line1.C: Likewise.
	* g++.dg/ext/complex4.C: Likewise.
	* g++.dg/ext/has_nothrow_assign.C: Likewise.
	* g++.dg/ext/has_nothrow_assign_odr.C: Likewise.
	* g++.dg/ext/has_nothrow_constructor.C: Likewise.
	* g++.dg/ext/has_nothrow_constructor_odr.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-1.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-2.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-3.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-4.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-5.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-6.C: Likewise.
	* g++.dg/ext/has_nothrow_copy-7.C: Likewise.
	* g++.dg/ext/has_nothrow_copy_odr.C: Likewise.
	* g++.dg/ext/has_trivial_assign.C: Likewise.
	* g++.dg/ext/has_trivial_constructor.C: Likewise.
	* g++.dg/ext/has_trivial_copy.C: Likewise.
	* g++.dg/ext/has_trivial_destructor-1.C: Likewise.
	* g++.dg/ext/has_virtual_destructor.C: Likewise.
	* g++.dg/ext/is_abstract.C: Likewise.
	* g++.dg/ext/is_aggregate.C: Likewise.
	* g++.dg/ext/is_base_of.C: Likewise.
	* g++.dg/ext/is_class.C: Likewise.
	* g++.dg/ext/is_convertible2.C: Likewise.
	* g++.dg/ext/is_empty.C: Likewise.
	* g++.dg/ext/is_enum.C: Likewise.
	* g++.dg/ext/is_pod.C: Likewise.
	* g++.dg/ext/is_polymorphic.C: Likewise.
	* g++.dg/ext/is_union.C: Likewise.
	* g++.dg/ext/underlying_type10.C: Likewise.
	* g++.dg/ext/underlying_type4.C: Likewise.
	* g++.dg/inherit/virtual8.C: Likewise.
	* g++.dg/init/array4.C: Likewise.
	* g++.dg/init/new18.C: Likewise.
	* g++.dg/init/new39.C: Likewise.
	* g++.dg/init/new40.C: Likewise.
	* g++.dg/ipa/devirt-29.C: Likewise.
	* g++.dg/ipa/pr85549.C: Likewise.
	* g++.dg/lookup/missing-std-include-3.C: Likewise.
	* g++.dg/lookup/pr21802.C: Likewise.
	* g++.dg/lto/20091022-2_0.C: Likewise.
	* g++.dg/lto/20091219_0.C: Likewise.
	* g++.dg/lto/pr89358_0.C: Likewise.
	* g++.dg/lto/pr89358_1.C: Likewise.
	* g++.dg/modules/binding-1_a.H: Likewise.
	* g++.dg/modules/binding-1_b.H: Likewise.
	* g++.dg/modules/contracts-1_a.C: Likewise.
	* g++.dg/modules/contracts-1_b.C: Likewise.
	* g++.dg/modules/contracts-2_a.C: Likewise.
	* g++.dg/modules/contracts-2_b.C: Likewise.
	* g++.dg/modules/contracts-3_a.C: Likewise.
	* g++.dg/modules/contracts-3_b.C: Likewise.
	* g++.dg/modules/contracts-4_a.C: Likewise.
	* g++.dg/modules/contracts-4_d.C: Likewise.
	* g++.dg/modules/global-3_a.C: Likewise.
	* g++.dg/modules/hello-1_a.C: Likewise.
	* g++.dg/modules/iostream-1_a.H: Likewise.
	* g++.dg/modules/part-5_c.C: Likewise.
	* g++.dg/modules/string-1_a.H: Likewise.
	* g++.dg/modules/string-1_b.C: Likewise.
	* g++.dg/modules/string-view1.C: Likewise.
	* g++.dg/opt/nrv17.C: Likewise.
	* g++.dg/opt/pr102970.C: Likewise.
	* g++.dg/opt/pr109434.C: Likewise.
	* g++.dg/opt/pr15551.C: Likewise.
	* g++.dg/opt/pr30965.C: Likewise.
	* g++.dg/opt/pr77844.C: Likewise.
	* g++.dg/opt/pr85393.C: Likewise.
	* g++.dg/other/final7.C: Likewise.
	* g++.dg/other/pr40561.C: Likewise.
	* g++.dg/parse/parse5.C: Likewise.
	* g++.dg/pr100253.C: Likewise.
	* g++.dg/pr104547.C: Likewise.
	* g++.dg/pr107087.C: Likewise.
	* g++.dg/pr71488.C: Likewise.
	* g++.dg/pr71655.C: Likewise.
	* g++.dg/pr79095-3.C: Likewise.
	* g++.dg/pr83239.C: Likewise.
	* g++.dg/pr99966.C: Likewise.
	* g++.dg/rtti/typeid4.C: Likewise.
	* g++.dg/spellcheck-inttypes.C: Likewise.
	* g++.dg/template/friend10.C: Likewise.
	* g++.dg/template/pr69961a.C: Likewise.
	* g++.dg/template/show-template-tree-3.C: Likewise.
	* g++.dg/torture/alias-1.C: Likewise.
	* g++.dg/torture/builtin-location.C: Likewise.
	* g++.dg/torture/pr103669.C: Likewise.
	* g++.dg/torture/pr104601.C: Likewise.
	* g++.dg/torture/pr106922.C: Likewise.
	* g++.dg/torture/pr111019.C: Likewise.
	* g++.dg/torture/pr33572.C: Likewise.
	* g++.dg/torture/pr33735.C: Likewise.
	* g++.dg/torture/pr34099.C: Likewise.
	* g++.dg/torture/pr39417.C: Likewise.
	* g++.dg/torture/pr44972.C: Likewise.
	* g++.dg/torture/pr46364.C: Likewise.
	* g++.dg/torture/pr49628.C: Likewise.
	* g++.dg/torture/pr51903.C: Likewise.
	* g++.dg/torture/pr54498.C: Likewise.
	* g++.dg/torture/pr60750.C: Likewise.
	* g++.dg/torture/pr67600.C: Likewise.
	* g++.dg/torture/pr82084.C: Likewise.
	* g++.dg/torture/pr95493-1.C: Likewise.
	* g++.dg/tree-ssa/allocator-opt1.C: Likewise.
	* g++.dg/tree-ssa/empty-loop.C: Likewise.
	* g++.dg/tree-ssa/initlist-opt1.C: Likewise.
	* g++.dg/tree-ssa/initlist-opt2.C: Likewise.
	* g++.dg/tree-ssa/initlist-opt3.C: Likewise.
	* g++.dg/tree-ssa/loop-cond-split-1.C: Likewise.
	* g++.dg/tree-ssa/pr101839.C: Likewise.
	* g++.dg/tree-ssa/pr104529.C: Likewise.
	* g++.dg/tree-ssa/pr14703.C: Likewise.
	* g++.dg/tree-ssa/pr19786.C: Likewise.
	* g++.dg/tree-ssa/pr46228.C: Likewise.
	* g++.dg/tree-ssa/pr63841.C: Likewise.
	* g++.dg/tree-ssa/pr69336.C: Likewise.
	* g++.dg/tree-ssa/pr78847.C: Likewise.
	* g++.dg/tree-ssa/pr95638.C: Likewise.
	* g++.dg/warn/Warray-bounds-27.C: Likewise.
	* g++.dg/warn/Wdangling-pointer-pr110055.C: Likewise.
	* g++.dg/warn/Wdangling-reference10.C: Likewise.
	* g++.dg/warn/Wdangling-reference4.C: Likewise.
	* g++.dg/warn/Wdangling-reference5.C: Likewise.
	* g++.dg/warn/Winline-3.C: Likewise.
	* g++.dg/warn/Wmemset-elt-size1.C: Likewise.
	* g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C: Likewise.
	* g++.dg/warn/Wstrict-aliasing-bogus-escape.C: Likewise.
	* g++.dg/warn/Wstringop-overflow-8.C: Likewise.
	* g++.dg/warn/Wstringop-overread-1.C: Likewise.
	* g++.dg/warn/Wuninitialized-33.C: Likewise.
	* g++.dg/warn/format1.C: Likewise.
	* g++.dg/warn/string1.C: Likewise.
	* g++.dg/warn/uninit-pr105562.C: Likewise.
	* g++.old-deja/g++.benjamin/15071.C: Likewise.
	* g++.old-deja/g++.brendan/copy9.C: Likewise.
	* g++.old-deja/g++.brendan/crash15.C: Likewise.
	* g++.old-deja/g++.brendan/crash20.C: Likewise.
	* g++.old-deja/g++.brendan/crash30.C: Likewise.
	* g++.old-deja/g++.brendan/crash38.C: Likewise.
	* g++.old-deja/g++.brendan/crash39.C: Likewise.
	* g++.old-deja/g++.brendan/crash49.C: Likewise.
	* g++.old-deja/g++.brendan/crash52.C: Likewise.
	* g++.old-deja/g++.brendan/crash62.C: Likewise.
	* g++.old-deja/g++.brendan/cvt1.C: Likewise.
	* g++.old-deja/g++.brendan/err-msg3.C: Likewise.
	* g++.old-deja/g++.brendan/nest21.C: Likewise.
	* g++.old-deja/g++.brendan/ptolemy2.C: Likewise.
	* g++.old-deja/g++.jason/template24.C: Likewise.
	* g++.old-deja/g++.jason/template31.C: Likewise.
	* g++.old-deja/g++.jason/typeid1.C: Likewise.
	* g++.old-deja/g++.law/arg1.C: Likewise.
	* g++.old-deja/g++.law/arg8.C: Likewise.
	* g++.old-deja/g++.law/arm12.C: Likewise.
	* g++.old-deja/g++.law/arm9.C: Likewise.
	* g++.old-deja/g++.law/bad-error7.C: Likewise.
	* g++.old-deja/g++.law/code-gen5.C: Likewise.
	* g++.old-deja/g++.law/ctors10.C: Likewise.
	* g++.old-deja/g++.law/ctors12.C: Likewise.
	* g++.old-deja/g++.law/ctors13.C: Likewise.
	* g++.old-deja/g++.law/ctors17.C: Likewise.
	* g++.old-deja/g++.law/ctors6.C: Likewise.
	* g++.old-deja/g++.law/cvt16.C: Likewise.
	* g++.old-deja/g++.law/cvt2.C: Likewise.
	* g++.old-deja/g++.law/cvt7.C: Likewise.
	* g++.old-deja/g++.law/except5.C: Likewise.
	* g++.old-deja/g++.law/missed-error2.C: Likewise.
	* g++.old-deja/g++.law/nest3.C: Likewise.
	* g++.old-deja/g++.law/operators32.C: Likewise.
	* g++.old-deja/g++.law/operators4.C: Likewise.
	* g++.old-deja/g++.law/vbase1.C: Likewise.
	* g++.old-deja/g++.law/virtual3.C: Likewise.
	* g++.old-deja/g++.law/visibility1.C: Likewise.
	* g++.old-deja/g++.law/visibility10.C: Likewise.
	* g++.old-deja/g++.law/visibility13.C: Likewise.
	* g++.old-deja/g++.law/visibility17.C: Likewise.
	* g++.old-deja/g++.law/visibility2.C: Likewise.
	* g++.old-deja/g++.law/visibility22.C: Likewise.
	* g++.old-deja/g++.law/visibility25.C: Likewise.
	* g++.old-deja/g++.law/visibility7.C: Likewise.
	* g++.old-deja/g++.martin/new1.C: Likewise.
	* g++.old-deja/g++.mike/dyncast7.C: Likewise.
	* g++.old-deja/g++.mike/eh13.C: Likewise.
	* g++.old-deja/g++.mike/eh2.C: Likewise.
	* g++.old-deja/g++.mike/net34.C: Likewise.
	* g++.old-deja/g++.mike/net46.C: Likewise.
	* g++.old-deja/g++.mike/p658.C: Likewise.
	* g++.old-deja/g++.mike/rtti1.C: Likewise.
	* g++.old-deja/g++.ns/using4.C: Likewise.
	* g++.old-deja/g++.ns/using6.C: Likewise.
	* g++.old-deja/g++.other/defarg6.C: Likewise.
	* g++.old-deja/g++.other/headers1.C: Likewise.
	* g++.old-deja/g++.other/init9.C: Likewise.
	* g++.old-deja/g++.other/inline14.C: Likewise.
	* g++.old-deja/g++.other/inline2.C: Likewise.
	* g++.old-deja/g++.other/inline7.C: Likewise.
	* g++.old-deja/g++.other/inline8.C: Likewise.
	* g++.old-deja/g++.other/optimize2.C: Likewise.
	* g++.old-deja/g++.other/sibcall1.C: Likewise.
	* g++.old-deja/g++.other/unchanging1.C: Likewise.
	* g++.old-deja/g++.pt/crash68.C: Likewise.
	* g++.old-deja/g++.pt/memtemp100.C: Likewise.
	* g++.old-deja/g++.robertl/eb109.C: Likewise.
	* g++.old-deja/g++.robertl/eb113.C: Likewise.
	* g++.old-deja/g++.robertl/eb115.C: Likewise.
	* g++.old-deja/g++.robertl/eb124.C: Likewise.
	* g++.old-deja/g++.robertl/eb127.C: Likewise.
	* g++.old-deja/g++.robertl/eb129.C: Likewise.
	* g++.old-deja/g++.robertl/eb129a.C: Likewise.
	* g++.old-deja/g++.robertl/eb130.C: Likewise.
	* g++.old-deja/g++.robertl/eb132.C: Likewise.
	* g++.old-deja/g++.robertl/eb15.C: Likewise.
	* g++.old-deja/g++.robertl/eb21.C: Likewise.
	* g++.old-deja/g++.robertl/eb24.C: Likewise.
	* g++.old-deja/g++.robertl/eb27.C: Likewise.
	* g++.old-deja/g++.robertl/eb28.C: Likewise.
	* g++.old-deja/g++.robertl/eb29.C: Likewise.
	* g++.old-deja/g++.robertl/eb3.C: Likewise.
	* g++.old-deja/g++.robertl/eb30.C: Likewise.
	* g++.old-deja/g++.robertl/eb31.C: Likewise.
	* g++.old-deja/g++.robertl/eb33.C: Likewise.
	* g++.old-deja/g++.robertl/eb36.C: Likewise.
	* g++.old-deja/g++.robertl/eb39.C: Likewise.
	* g++.old-deja/g++.robertl/eb4.C: Likewise.
	* g++.old-deja/g++.robertl/eb41.C: Likewise.
	* g++.old-deja/g++.robertl/eb43.C: Likewise.
	* g++.old-deja/g++.robertl/eb44.C: Likewise.
	* g++.old-deja/g++.robertl/eb46.C: Likewise.
	* g++.old-deja/g++.robertl/eb54.C: Likewise.
	* g++.old-deja/g++.robertl/eb55.C: Likewise.
	* g++.old-deja/g++.robertl/eb59.C: Likewise.
	* g++.old-deja/g++.robertl/eb60.C: Likewise.
	* g++.old-deja/g++.robertl/eb62.C: Likewise.
	* g++.old-deja/g++.robertl/eb66.C: Likewise.
	* g++.old-deja/g++.robertl/eb7.C: Likewise.
	* g++.old-deja/g++.robertl/eb73.C: Likewise.
	* g++.old-deja/g++.robertl/eb77.C: Likewise.
	* g++.old-deja/g++.robertl/eb79.C: Likewise.
	* g++.old-deja/g++.warn/iomanip.C: Likewise.
	* g++.dg/analyzer/vfunc-2.C: Likewise.
	* g++.dg/coroutines/pr100772-b.C: Likewise.
	* g++.dg/coroutines/pr101133.C: Likewise.
	* g++.dg/coroutines/pr95736.C: Likewise.
	* g++.dg/coroutines/ramp-return-a.C: Likewise.
	* g++.dg/coroutines/ramp-return-b.C: Likewise.
	* g++.dg/coroutines/ramp-return-c.C: Likewise.
	* g++.dg/coroutines/torture/extern-c-coroutine.C: Likewise.
	* g++.dg/coroutines/torture/pr95615-01.C: Likewise.
	* g++.dg/coroutines/torture/pr95615-02.C: Likewise.
	* g++.dg/coroutines/torture/pr95615-03.C: Likewise.
	* g++.dg/coroutines/torture/pr95615-04.C: Likewise.
	* g++.dg/coroutines/torture/pr95615-05.C: Likewise.
	* g++.dg/cpp0x/udlit-string-literal.C: Likewise.
	* g++.dg/cpp1y/udlit-userdef-string.C: Likewise.
	* g++.dg/modules/xtreme-header-1_a.H: Likewise.
	* g++.dg/modules/xtreme-header-1_b.C: Likewise.
	* g++.dg/modules/xtreme-header-2_a.H: Likewise.
	* g++.dg/modules/xtreme-header-2_b.C: Likewise.
	* g++.dg/modules/xtreme-header-3_a.H: Likewise.
	* g++.dg/modules/xtreme-header-3_b.C: Likewise.
	* g++.dg/modules/xtreme-header-4_a.H: Likewise.
	* g++.dg/modules/xtreme-header-4_b.C: Likewise.
	* g++.dg/modules/xtreme-header-5_a.H: Likewise.
	* g++.dg/modules/xtreme-header-5_b.C: Likewise.
	* g++.dg/modules/xtreme-header-6_a.H: Likewise.
	* g++.dg/modules/xtreme-header-6_b.C: Likewise.
	* g++.dg/modules/xtreme-header_a.H: Likewise.
	* g++.dg/modules/xtreme-header_b.C: Likewise.
	* g++.dg/modules/xtreme-tr1_a.H: Likewise.
	* g++.dg/modules/xtreme-tr1_b.C: Likewise.
	* g++.dg/opt/dtor4-aux.cc: Likewise.
	* g++.dg/opt/dtor4.C: Likewise.
	* g++.dg/parse/lookup1.C: Likewise.
	* g++.dg/torture/pr49938.C: Likewise.
	* g++.dg/warn/Wfree-nonheap-object-3.C: Likewise.
	* g++.dg/warn/Wstringop-overflow-6.C: Likewise.
	* g++.dg/coroutines/pr101765.C: Skip in !hostedlib because of
	unavailable ::abort in cstdlib.
	* g++.dg/coroutines/pr95477.C: Likewise.
	* g++.dg/coroutines/pr95599.C: Likewise.
	* g++.dg/coroutines/pr95711.C: Likewise.
	* g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C: Likewise.
	* g++.dg/coroutines/torture/alloc-01-overload-newdel.C: Likewise.
	* g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C: Likewise.
	* g++.dg/coroutines/torture/alloc-03-overload-new-1.C: Likewise.
	* g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C: Likewise.
	* g++.dg/coroutines/torture/call-00-co-aw-arg.C: Likewise.
	* g++.dg/coroutines/torture/call-01-multiple-co-aw.C: Likewise.
	* g++.dg/coroutines/torture/call-02-temp-co-aw.C: Likewise.
	* g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C: Likewise.
	* g++.dg/coroutines/torture/class-00-co-ret.C: Likewise.
	* g++.dg/coroutines/torture/class-01-co-ret-parm.C: Likewise.
	* g++.dg/coroutines/torture/class-02-templ-parm.C: Likewise.
	* g++.dg/coroutines/torture/class-03-operator-templ-parm.C: Likewise.
	* g++.dg/coroutines/torture/class-04-lambda-1.C: Likewise.
	* g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C: Likewise.
	* g++.dg/coroutines/torture/class-06-lambda-capture-ref.C: Likewise.
	* g++.dg/coroutines/torture/class-07-data-member.C: Likewise.
	* g++.dg/coroutines/torture/co-await-00-trivial.C: Likewise.
	* g++.dg/coroutines/torture/co-await-01-with-value.C: Likewise.
	* g++.dg/coroutines/torture/co-await-02-xform.C: Likewise.
	* g++.dg/coroutines/torture/co-await-03-rhs-op.C: Likewise.
	* g++.dg/coroutines/torture/co-await-04-control-flow.C: Likewise.
	* g++.dg/coroutines/torture/co-await-05-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-await-06-ovl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-07-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-08-cascade.C: Likewise.
	* g++.dg/coroutines/torture/co-await-09-pair.C: Likewise.
	* g++.dg/coroutines/torture/co-await-10-template-fn-arg.C: Likewise.
	* g++.dg/coroutines/torture/co-await-11-forwarding.C: Likewise.
	* g++.dg/coroutines/torture/co-await-12-operator-2.C: Likewise.
	* g++.dg/coroutines/torture/co-await-13-return-ref.C: Likewise.
	* g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C: Likewise.
	* g++.dg/coroutines/torture/co-await-15-return-non-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C: Likewise.
	* g++.dg/coroutines/torture/co-await-18-if-cond.C: Likewise.
	* g++.dg/coroutines/torture/co-await-19-while-cond.C: Likewise.
	* g++.dg/coroutines/torture/co-await-20-do-while-cond.C: Likewise.
	* g++.dg/coroutines/torture/co-await-21-switch-value.C: Likewise.
	* g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C: Likewise.
	* g++.dg/coroutines/torture/co-await-24-for-init.C: Likewise.
	* g++.dg/coroutines/torture/co-await-25-for-condition.C: Likewise.
	* g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-05-return-value.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-13-template-2.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-14-template-3.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-00-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-01-multi.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-02-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-03-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-05-co-aw.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-06-fun-parm.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-07-template-fn-param.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-08-more-refs.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C: Likewise.
	* g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
	* g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C: Likewise.
	* g++.dg/coroutines/torture/func-params-00.C: Likewise.
	* g++.dg/coroutines/torture/func-params-01.C: Likewise.
	* g++.dg/coroutines/torture/func-params-02.C: Likewise.
	* g++.dg/coroutines/torture/func-params-03.C: Likewise.
	* g++.dg/coroutines/torture/func-params-04.C: Likewise.
	* g++.dg/coroutines/torture/func-params-05.C: Likewise.
	* g++.dg/coroutines/torture/func-params-06.C: Likewise.
	* g++.dg/coroutines/torture/func-params-07.C: Likewise.
	* g++.dg/coroutines/torture/lambda-00-co-ret.C: Likewise.
	* g++.dg/coroutines/torture/lambda-01-co-ret-parm.C: Likewise.
	* g++.dg/coroutines/torture/lambda-02-co-yield-values.C: Likewise.
	* g++.dg/coroutines/torture/lambda-03-auto-parm-1.C: Likewise.
	* g++.dg/coroutines/torture/lambda-04-templ-parm.C: Likewise.
	* g++.dg/coroutines/torture/lambda-05-capture-copy-local.C: Likewise.
	* g++.dg/coroutines/torture/lambda-06-multi-capture.C: Likewise.
	* g++.dg/coroutines/torture/lambda-07-multi-yield.C: Likewise.
	* g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C: Likewise.
	* g++.dg/coroutines/torture/lambda-09-init-captures.C: Likewise.
	* g++.dg/coroutines/torture/lambda-10-mutable.C: Likewise.
	* g++.dg/coroutines/torture/local-var-00-const.C: Likewise.
	* g++.dg/coroutines/torture/local-var-01-single.C: Likewise.
	* g++.dg/coroutines/torture/local-var-02-conditional.C: Likewise.
	* g++.dg/coroutines/torture/local-var-03-with-awaits.C: Likewise.
	* g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C: Likewise.
	* g++.dg/coroutines/torture/local-var-06-structured-binding.C: Likewise.
	* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
	* g++.dg/coroutines/torture/pr95003.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-00-return_void.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-01-initial-suspend.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-02-final_suspend.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-03-return-value.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-04-yield-value.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-05-gro.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-06-grooaf.C: Likewise.
	* g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C: Likewise.
	* g++.dg/cpp23/subscript5.C: Likewise.
	* g++.dg/cpp23/subscript6.C: Likewise.
	* g++.dg/eh/filter2.C: Likewise.
	* g++.dg/eh/uncaught1.C: Likewise.
	* g++.dg/eh/uncaught2.C: Likewise.
	* g++.dg/opt/eh4.C: Likewise.
	* g++.dg/opt/reload3.C: Likewise.
	* g++.dg/other/ucnid-1-utf8.C: Likewise.
	* g++.dg/other/ucnid-1.C: Likewise.
	* g++.dg/warn/noreturn-1.C: Likewise.
---
 gcc/doc/sourcebuild.texi                           |    4 ++++
 gcc/testsuite/c-c++-common/pr36513-2.c             |    1 +
 gcc/testsuite/g++.dg/analyzer/pr93212.C            |    1 +
 gcc/testsuite/g++.dg/analyzer/vfunc-2.C            |    1 +
 gcc/testsuite/g++.dg/concepts/expression.C         |    1 +
 gcc/testsuite/g++.dg/concepts/fn3.C                |    1 +
 gcc/testsuite/g++.dg/concepts/fn9.C                |    1 +
 gcc/testsuite/g++.dg/concepts/generic-fn.C         |    1 +
 gcc/testsuite/g++.dg/concepts/intro2.C             |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-access1.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-assume2.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-assume3.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-assume4.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-config1.C |    1 +
 .../g++.dg/contracts/contracts-constexpr1.C        |    1 +
 .../g++.dg/contracts/contracts-deduced2.C          |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-externC.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-friend1.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-ignore2.C |    1 +
 .../g++.dg/contracts/contracts-multiline1.C        |    1 +
 .../g++.dg/contracts/contracts-nested-class2.C     |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-post2.C   |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-post3.C   |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre10.C   |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre2.C    |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C  |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre3.C    |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre4.C    |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre5.C    |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre7.C    |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-pre9.C    |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-redecl3.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-redecl4.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-redecl6.C |    1 +
 gcc/testsuite/g++.dg/contracts/contracts-redecl7.C |    1 +
 .../g++.dg/contracts/contracts-tmpl-spec1.C        |    1 +
 .../g++.dg/contracts/contracts-tmpl-spec2.C        |    1 +
 .../g++.dg/contracts/contracts-tmpl-spec3.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts10.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts14.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts15.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts16.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts17.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts18.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts19.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts2.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts22.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts24.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts25.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts3.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts35.C       |    1 +
 gcc/testsuite/g++.dg/contracts/contracts4.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts5.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts6.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts7.C        |    1 +
 gcc/testsuite/g++.dg/contracts/contracts9.C        |    1 +
 gcc/testsuite/g++.dg/coroutines/pr100611.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr100772-b.C       |    1 +
 gcc/testsuite/g++.dg/coroutines/pr101133.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr101367.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr101765.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr101976.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr102454.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr104051.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr94288.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr95477.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr95520.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr95599.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr95711.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr95736.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr97587.C          |    1 +
 gcc/testsuite/g++.dg/coroutines/pr99576_1.C        |    1 +
 gcc/testsuite/g++.dg/coroutines/pr99576_2.C        |    1 +
 gcc/testsuite/g++.dg/coroutines/ramp-return-a.C    |    1 +
 gcc/testsuite/g++.dg/coroutines/ramp-return-b.C    |    1 +
 gcc/testsuite/g++.dg/coroutines/ramp-return-c.C    |    1 +
 .../torture/alloc-00-gro-on-alloc-fail.C           |    1 +
 .../coroutines/torture/alloc-01-overload-newdel.C  |    1 +
 .../torture/alloc-02-fail-new-grooaf-check.C       |    1 +
 .../coroutines/torture/alloc-03-overload-new-1.C   |    1 +
 .../torture/alloc-04-overload-del-use-two-args.C   |    1 +
 .../g++.dg/coroutines/torture/call-00-co-aw-arg.C  |    1 +
 .../coroutines/torture/call-01-multiple-co-aw.C    |    1 +
 .../g++.dg/coroutines/torture/call-02-temp-co-aw.C |    1 +
 .../coroutines/torture/call-03-temp-ref-co-aw.C    |    1 +
 .../g++.dg/coroutines/torture/class-00-co-ret.C    |    1 +
 .../coroutines/torture/class-01-co-ret-parm.C      |    1 +
 .../coroutines/torture/class-02-templ-parm.C       |    1 +
 .../torture/class-03-operator-templ-parm.C         |    1 +
 .../g++.dg/coroutines/torture/class-04-lambda-1.C  |    1 +
 .../torture/class-05-lambda-capture-copy-local.C   |    1 +
 .../torture/class-06-lambda-capture-ref.C          |    1 +
 .../coroutines/torture/class-07-data-member.C      |    1 +
 .../coroutines/torture/co-await-00-trivial.C       |    1 +
 .../coroutines/torture/co-await-01-with-value.C    |    1 +
 .../g++.dg/coroutines/torture/co-await-02-xform.C  |    1 +
 .../g++.dg/coroutines/torture/co-await-03-rhs-op.C |    1 +
 .../coroutines/torture/co-await-04-control-flow.C  |    1 +
 .../g++.dg/coroutines/torture/co-await-05-loop.C   |    1 +
 .../g++.dg/coroutines/torture/co-await-06-ovl.C    |    1 +
 .../g++.dg/coroutines/torture/co-await-07-tmpl.C   |    1 +
 .../coroutines/torture/co-await-08-cascade.C       |    1 +
 .../g++.dg/coroutines/torture/co-await-09-pair.C   |    1 +
 .../torture/co-await-10-template-fn-arg.C          |    1 +
 .../coroutines/torture/co-await-11-forwarding.C    |    1 +
 .../coroutines/torture/co-await-12-operator-2.C    |    1 +
 .../coroutines/torture/co-await-13-return-ref.C    |    1 +
 .../torture/co-await-14-return-ref-to-auto.C       |    1 +
 .../torture/co-await-15-return-non-triv.C          |    1 +
 .../torture/co-await-16-template-traits.C          |    1 +
 .../torture/co-await-17-capture-comp-ref.C         |    1 +
 .../coroutines/torture/co-await-18-if-cond.C       |    1 +
 .../coroutines/torture/co-await-19-while-cond.C    |    1 +
 .../coroutines/torture/co-await-20-do-while-cond.C |    1 +
 .../coroutines/torture/co-await-21-switch-value.C  |    1 +
 .../torture/co-await-22-truth-and-of-if.C          |    1 +
 .../coroutines/torture/co-await-24-for-init.C      |    1 +
 .../coroutines/torture/co-await-25-for-condition.C |    1 +
 .../torture/co-await-26-for-iteration-expr.C       |    1 +
 .../torture/co-ret-00-void-return-is-ready.C       |    1 +
 .../torture/co-ret-01-void-return-is-suspend.C     |    1 +
 .../torture/co-ret-03-different-GRO-type.C         |    1 +
 .../coroutines/torture/co-ret-04-GRO-nontriv.C     |    1 +
 .../coroutines/torture/co-ret-05-return-value.C    |    1 +
 .../torture/co-ret-06-template-promise-val-1.C     |    1 +
 .../coroutines/torture/co-ret-07-void-cast-expr.C  |    1 +
 .../torture/co-ret-08-template-cast-ret.C          |    1 +
 .../coroutines/torture/co-ret-09-bool-await-susp.C |    1 +
 .../torture/co-ret-10-expression-evaluates-once.C  |    1 +
 .../coroutines/torture/co-ret-11-co-ret-co-await.C |    1 +
 .../torture/co-ret-12-co-ret-fun-co-await.C        |    1 +
 .../coroutines/torture/co-ret-13-template-2.C      |    1 +
 .../coroutines/torture/co-ret-14-template-3.C      |    1 +
 .../torture/co-ret-15-default-return_void.C        |    1 +
 .../torture/co-ret-16-simple-control-flow.C        |    1 +
 .../coroutines/torture/co-ret-17-void-ret-coro.C   |    1 +
 .../g++.dg/coroutines/torture/co-yield-00-triv.C   |    1 +
 .../g++.dg/coroutines/torture/co-yield-01-multi.C  |    1 +
 .../g++.dg/coroutines/torture/co-yield-02-loop.C   |    1 +
 .../g++.dg/coroutines/torture/co-yield-03-tmpl.C   |    1 +
 .../torture/co-yield-04-complex-local-state.C      |    1 +
 .../g++.dg/coroutines/torture/co-yield-05-co-aw.C  |    1 +
 .../coroutines/torture/co-yield-06-fun-parm.C      |    1 +
 .../torture/co-yield-07-template-fn-param.C        |    1 +
 .../coroutines/torture/co-yield-08-more-refs.C     |    1 +
 .../torture/co-yield-09-more-templ-refs.C          |    1 +
 .../g++.dg/coroutines/torture/exceptions-test-0.C  |    1 +
 .../torture/exceptions-test-01-n4849-a.C           |    1 +
 .../g++.dg/coroutines/torture/extern-c-coroutine.C |    2 ++
 .../g++.dg/coroutines/torture/func-params-00.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-01.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-02.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-03.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-04.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-05.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-06.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-07.C     |    1 +
 .../g++.dg/coroutines/torture/func-params-08.C     |    1 +
 .../torture/func-params-09-awaitable-parms.C       |    1 +
 .../g++.dg/coroutines/torture/lambda-00-co-ret.C   |    1 +
 .../coroutines/torture/lambda-01-co-ret-parm.C     |    1 +
 .../coroutines/torture/lambda-02-co-yield-values.C |    1 +
 .../coroutines/torture/lambda-03-auto-parm-1.C     |    1 +
 .../coroutines/torture/lambda-04-templ-parm.C      |    1 +
 .../torture/lambda-05-capture-copy-local.C         |    1 +
 .../coroutines/torture/lambda-06-multi-capture.C   |    1 +
 .../coroutines/torture/lambda-07-multi-yield.C     |    1 +
 .../coroutines/torture/lambda-08-co-ret-parm-ref.C |    1 +
 .../coroutines/torture/lambda-09-init-captures.C   |    1 +
 .../g++.dg/coroutines/torture/lambda-10-mutable.C  |    1 +
 .../g++.dg/coroutines/torture/local-var-00-const.C |    1 +
 .../coroutines/torture/local-var-01-single.C       |    1 +
 .../coroutines/torture/local-var-02-conditional.C  |    1 +
 .../coroutines/torture/local-var-03-with-awaits.C  |    1 +
 .../torture/local-var-04-hiding-nested-scopes.C    |    1 +
 .../coroutines/torture/local-var-05-awaitable.C    |    1 +
 .../torture/local-var-06-structured-binding.C      |    1 +
 .../coroutines/torture/mid-suspend-destruction-0.C |    1 +
 gcc/testsuite/g++.dg/coroutines/torture/pr95003.C  |    1 +
 .../coroutines/torture/pr95519-00-return_void.C    |    1 +
 .../torture/pr95519-01-initial-suspend.C           |    1 +
 .../coroutines/torture/pr95519-02-final_suspend.C  |    1 +
 .../coroutines/torture/pr95519-03-return-value.C   |    1 +
 .../coroutines/torture/pr95519-04-yield-value.C    |    1 +
 .../g++.dg/coroutines/torture/pr95519-05-gro.C     |    1 +
 .../g++.dg/coroutines/torture/pr95519-06-grooaf.C  |    1 +
 .../torture/pr95519-07-unhandled-exception.C       |    1 +
 .../g++.dg/coroutines/torture/pr95615-01.C         |    1 +
 .../g++.dg/coroutines/torture/pr95615-02.C         |    1 +
 .../g++.dg/coroutines/torture/pr95615-03.C         |    1 +
 .../g++.dg/coroutines/torture/pr95615-04.C         |    1 +
 .../g++.dg/coroutines/torture/pr95615-05.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/torture/pr98704.C  |    1 +
 gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C       |    1 +
 gcc/testsuite/g++.dg/cpp0x/Wpessimizing-move2.C    |    1 +
 gcc/testsuite/g++.dg/cpp0x/constexpr-70001-3.C     |    1 +
 gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C       |    1 +
 gcc/testsuite/g++.dg/cpp0x/dc5.C                   |    1 +
 gcc/testsuite/g++.dg/cpp0x/enum35.C                |    1 +
 gcc/testsuite/g++.dg/cpp0x/enum36.C                |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist-opt1.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C        |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist13.C            |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist15.C            |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist25.C            |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist54.C            |    1 +
 gcc/testsuite/g++.dg/cpp0x/initlist92.C            |    1 +
 .../cpp0x/lambda/lambda-capture-const-ref-neg.C    |    1 +
 .../g++.dg/cpp0x/lambda/lambda-capture-const-ref.C |    1 +
 .../g++.dg/cpp0x/lambda/lambda-const-neg.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C   |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C  |    1 +
 .../g++.dg/cpp0x/lambda/lambda-in-class-neg.C      |    1 +
 .../g++.dg/cpp0x/lambda/lambda-in-class.C          |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C   |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C  |    1 +
 .../g++.dg/cpp0x/lambda/lambda-non-const.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C     |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C    |    1 +
 .../g++.dg/cpp0x/lambda/lambda-recursive.C         |    1 +
 .../g++.dg/cpp0x/lambda/lambda-ref-default.C       |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C     |    1 +
 gcc/testsuite/g++.dg/cpp0x/nullptr20.C             |    1 +
 gcc/testsuite/g++.dg/cpp0x/pr61038.C               |    1 +
 gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C        |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C      |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-concat.C          |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C     |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-general.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C       |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C          |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-resolve-char8_t.C |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-sfinae.C          |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C  |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C      |    1 +
 gcc/testsuite/g++.dg/cpp0x/udlit-template.C        |    1 +
 gcc/testsuite/g++.dg/cpp0x/variadic-bind.C         |    1 +
 gcc/testsuite/g++.dg/cpp0x/variadic-function.C     |    1 +
 gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C       |    1 +
 gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C        |    1 +
 gcc/testsuite/g++.dg/cpp1y/auto-fn45.C             |    1 +
 gcc/testsuite/g++.dg/cpp1y/complex_literals1.C     |    1 +
 gcc/testsuite/g++.dg/cpp1y/complex_literals1a.C    |    1 +
 gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C       |    1 +
 gcc/testsuite/g++.dg/cpp1y/constexpr-assert1.C     |    1 +
 gcc/testsuite/g++.dg/cpp1y/constexpr-assert2.C     |    1 +
 .../g++.dg/cpp1y/lambda-generic-69078-2.C          |    1 +
 gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C      |    1 +
 gcc/testsuite/g++.dg/cpp1y/lambda-init8.C          |    1 +
 gcc/testsuite/g++.dg/cpp1y/new2.C                  |    1 +
 gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr12.C          |    1 +
 gcc/testsuite/g++.dg/cpp1y/pr57640.C               |    1 +
 gcc/testsuite/g++.dg/cpp1y/pr77786.C               |    1 +
 gcc/testsuite/g++.dg/cpp1y/pr95226.C               |    1 +
 .../g++.dg/cpp1y/udlit-char-template-sfinae.C      |    1 +
 .../udlit-char-template-vs-std-literal-operator.C  |    1 +
 gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C  |    1 +
 gcc/testsuite/g++.dg/cpp1z/class-deduction14.C     |    1 +
 gcc/testsuite/g++.dg/cpp1z/decomp37.C              |    1 +
 gcc/testsuite/g++.dg/cpp1z/eval-order2.C           |    1 +
 gcc/testsuite/g++.dg/cpp1z/fold1.C                 |    1 +
 gcc/testsuite/g++.dg/cpp1z/init-statement6.C       |    1 +
 gcc/testsuite/g++.dg/cpp1z/launder3.C              |    1 +
 gcc/testsuite/g++.dg/cpp1z/launder4.C              |    1 +
 gcc/testsuite/g++.dg/cpp1z/launder5.C              |    1 +
 gcc/testsuite/g++.dg/cpp1z/launder6.C              |    1 +
 gcc/testsuite/g++.dg/cpp1z/utf8.C                  |    1 +
 gcc/testsuite/g++.dg/cpp23/subscript5.C            |    1 +
 gcc/testsuite/g++.dg/cpp23/subscript6.C            |    1 +
 gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C        |    1 +
 .../g++.dg/cpp2a/concepts-explicit-spec1.C         |    1 +
 .../g++.dg/cpp2a/concepts-explicit-spec4.C         |    1 +
 .../g++.dg/cpp2a/concepts-explicit-spec5.C         |    1 +
 gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C       |    1 +
 gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C      |    1 +
 gcc/testsuite/g++.dg/cpp2a/cond-triv2.C            |    1 +
 gcc/testsuite/g++.dg/cpp2a/nontype-float1.C        |    1 +
 gcc/testsuite/g++.dg/diagnostic/disable.C          |    1 +
 gcc/testsuite/g++.dg/diagnostic/pr65923.C          |    1 +
 gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C           |    1 +
 gcc/testsuite/g++.dg/eh/crossjump1.C               |    1 +
 gcc/testsuite/g++.dg/eh/filter2.C                  |    1 +
 gcc/testsuite/g++.dg/eh/omit-frame-pointer.C       |    1 +
 gcc/testsuite/g++.dg/eh/simd-3.C                   |    1 +
 gcc/testsuite/g++.dg/eh/uncaught1.C                |    1 +
 gcc/testsuite/g++.dg/eh/uncaught2.C                |    1 +
 gcc/testsuite/g++.dg/ext/bases.C                   |    1 +
 gcc/testsuite/g++.dg/ext/builtin-line1.C           |    1 +
 gcc/testsuite/g++.dg/ext/complex4.C                |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_assign.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C  |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_constructor.C |    1 +
 .../g++.dg/ext/has_nothrow_constructor_odr.C       |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C    |    1 +
 gcc/testsuite/g++.dg/ext/has_trivial_assign.C      |    1 +
 gcc/testsuite/g++.dg/ext/has_trivial_constructor.C |    1 +
 gcc/testsuite/g++.dg/ext/has_trivial_copy.C        |    1 +
 .../g++.dg/ext/has_trivial_destructor-1.C          |    1 +
 gcc/testsuite/g++.dg/ext/has_virtual_destructor.C  |    1 +
 gcc/testsuite/g++.dg/ext/is_abstract.C             |    1 +
 gcc/testsuite/g++.dg/ext/is_aggregate.C            |    1 +
 gcc/testsuite/g++.dg/ext/is_base_of.C              |    1 +
 gcc/testsuite/g++.dg/ext/is_class.C                |    1 +
 gcc/testsuite/g++.dg/ext/is_convertible2.C         |    1 +
 gcc/testsuite/g++.dg/ext/is_empty.C                |    1 +
 gcc/testsuite/g++.dg/ext/is_enum.C                 |    1 +
 gcc/testsuite/g++.dg/ext/is_pod.C                  |    1 +
 gcc/testsuite/g++.dg/ext/is_polymorphic.C          |    1 +
 gcc/testsuite/g++.dg/ext/is_union.C                |    1 +
 gcc/testsuite/g++.dg/ext/underlying_type10.C       |    1 +
 gcc/testsuite/g++.dg/ext/underlying_type4.C        |    1 +
 gcc/testsuite/g++.dg/inherit/virtual8.C            |    1 +
 gcc/testsuite/g++.dg/init/array4.C                 |    1 +
 gcc/testsuite/g++.dg/init/new18.C                  |    1 +
 gcc/testsuite/g++.dg/init/new39.C                  |    1 +
 gcc/testsuite/g++.dg/init/new40.C                  |    1 +
 gcc/testsuite/g++.dg/ipa/devirt-29.C               |    1 +
 gcc/testsuite/g++.dg/ipa/pr85549.C                 |    1 +
 .../g++.dg/lookup/missing-std-include-3.C          |    1 +
 gcc/testsuite/g++.dg/lookup/pr21802.C              |    1 +
 gcc/testsuite/g++.dg/lto/20091022-2_0.C            |    1 +
 gcc/testsuite/g++.dg/lto/20091219_0.C              |    1 +
 gcc/testsuite/g++.dg/lto/pr89358_0.C               |    1 +
 gcc/testsuite/g++.dg/lto/pr89358_1.C               |    1 +
 gcc/testsuite/g++.dg/modules/binding-1_a.H         |    1 +
 gcc/testsuite/g++.dg/modules/binding-1_b.H         |    1 +
 gcc/testsuite/g++.dg/modules/contracts-1_a.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-1_b.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-2_a.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-2_b.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-3_a.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-3_b.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-4_a.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-4_d.C       |    1 +
 gcc/testsuite/g++.dg/modules/global-3_a.C          |    1 +
 gcc/testsuite/g++.dg/modules/hello-1_a.C           |    1 +
 gcc/testsuite/g++.dg/modules/iostream-1_a.H        |    1 +
 gcc/testsuite/g++.dg/modules/part-5_c.C            |    1 +
 gcc/testsuite/g++.dg/modules/string-1_a.H          |    1 +
 gcc/testsuite/g++.dg/modules/string-1_b.C          |    1 +
 gcc/testsuite/g++.dg/modules/string-view1.C        |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-1_b.C   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-2_b.C   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-3_b.C   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-4_b.C   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-6_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-6_b.C   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header_a.H     |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header_b.C     |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H        |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-tr1_b.C        |    1 +
 gcc/testsuite/g++.dg/opt/dtor4-aux.cc              |    1 +
 gcc/testsuite/g++.dg/opt/dtor4.C                   |    1 +
 gcc/testsuite/g++.dg/opt/eh4.C                     |    1 +
 gcc/testsuite/g++.dg/opt/nrv17.C                   |    1 +
 gcc/testsuite/g++.dg/opt/pr102970.C                |    1 +
 gcc/testsuite/g++.dg/opt/pr109434.C                |    1 +
 gcc/testsuite/g++.dg/opt/pr15551.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr30965.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr77844.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr85393.C                 |    1 +
 gcc/testsuite/g++.dg/opt/reload3.C                 |    1 +
 gcc/testsuite/g++.dg/other/final7.C                |    1 +
 gcc/testsuite/g++.dg/other/pr40561.C               |    1 +
 gcc/testsuite/g++.dg/other/ucnid-1-utf8.C          |    1 +
 gcc/testsuite/g++.dg/other/ucnid-1.C               |    1 +
 gcc/testsuite/g++.dg/parse/lookup1.C               |    1 +
 gcc/testsuite/g++.dg/parse/parse5.C                |    1 +
 gcc/testsuite/g++.dg/pch/system-1.C                |    2 ++
 gcc/testsuite/g++.dg/pch/system-2.C                |    2 ++
 gcc/testsuite/g++.dg/pr100253.C                    |    1 +
 gcc/testsuite/g++.dg/pr104547.C                    |    1 +
 gcc/testsuite/g++.dg/pr107087.C                    |    1 +
 gcc/testsuite/g++.dg/pr71488.C                     |    1 +
 gcc/testsuite/g++.dg/pr71655.C                     |    1 +
 gcc/testsuite/g++.dg/pr79095-3.C                   |    1 +
 gcc/testsuite/g++.dg/pr83239.C                     |    1 +
 gcc/testsuite/g++.dg/pr99966.C                     |    1 +
 gcc/testsuite/g++.dg/rtti/typeid4.C                |    1 +
 gcc/testsuite/g++.dg/spellcheck-inttypes.C         |    1 +
 gcc/testsuite/g++.dg/template/friend10.C           |    1 +
 gcc/testsuite/g++.dg/template/pr69961a.C           |    1 +
 .../g++.dg/template/show-template-tree-3.C         |    1 +
 gcc/testsuite/g++.dg/torture/alias-1.C             |    1 +
 gcc/testsuite/g++.dg/torture/builtin-location.C    |    1 +
 gcc/testsuite/g++.dg/torture/pr103669.C            |    1 +
 gcc/testsuite/g++.dg/torture/pr104601.C            |    1 +
 gcc/testsuite/g++.dg/torture/pr106922.C            |    1 +
 gcc/testsuite/g++.dg/torture/pr111019.C            |    1 +
 gcc/testsuite/g++.dg/torture/pr33572.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr33735.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr34099.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr39417.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr44972.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr46364.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr49628.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr49938.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr51903.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr54498.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr60750.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr67600.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr82084.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr95493-1.C           |    1 +
 gcc/testsuite/g++.dg/tree-ssa/allocator-opt1.C     |    1 +
 gcc/testsuite/g++.dg/tree-ssa/empty-loop.C         |    1 +
 gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C      |    1 +
 gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C      |    1 +
 gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C      |    1 +
 gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C  |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr101839.C           |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr104529.C           |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr14703.C            |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr19786.C            |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr46228.C            |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr63841.C            |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr69336.C            |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr78847.C            |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr95638.C            |    1 +
 gcc/testsuite/g++.dg/warn/Warray-bounds-27.C       |    1 +
 .../g++.dg/warn/Wdangling-pointer-pr110055.C       |    1 +
 gcc/testsuite/g++.dg/warn/Wdangling-reference10.C  |    1 +
 gcc/testsuite/g++.dg/warn/Wdangling-reference4.C   |    1 +
 gcc/testsuite/g++.dg/warn/Wdangling-reference5.C   |    1 +
 gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C |    3 ++-
 gcc/testsuite/g++.dg/warn/Winline-3.C              |    1 +
 gcc/testsuite/g++.dg/warn/Wmemset-elt-size1.C      |    1 +
 .../g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C  |    1 +
 .../g++.dg/warn/Wstrict-aliasing-bogus-escape.C    |    1 +
 gcc/testsuite/g++.dg/warn/Wstringop-overflow-6.C   |    3 ++-
 gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C   |    1 +
 gcc/testsuite/g++.dg/warn/Wstringop-overread-1.C   |    1 +
 gcc/testsuite/g++.dg/warn/Wuninitialized-33.C      |    1 +
 gcc/testsuite/g++.dg/warn/format1.C                |    1 +
 gcc/testsuite/g++.dg/warn/noreturn-1.C             |    1 +
 gcc/testsuite/g++.dg/warn/string1.C                |    1 +
 gcc/testsuite/g++.dg/warn/uninit-pr105562.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.benjamin/15071.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/copy9.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash15.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash20.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash30.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash38.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash39.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash49.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash52.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/crash62.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/nest21.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.jason/template24.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.jason/template31.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.jason/typeid1.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.law/arg1.C          |    1 +
 gcc/testsuite/g++.old-deja/g++.law/arg8.C          |    1 +
 gcc/testsuite/g++.old-deja/g++.law/arm12.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.law/arm9.C          |    1 +
 gcc/testsuite/g++.old-deja/g++.law/bad-error7.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.law/code-gen5.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.law/ctors10.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.law/ctors12.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.law/ctors13.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.law/ctors17.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.law/ctors6.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.law/cvt16.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.law/cvt2.C          |    1 +
 gcc/testsuite/g++.old-deja/g++.law/cvt7.C          |    1 +
 gcc/testsuite/g++.old-deja/g++.law/except5.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.law/missed-error2.C |    1 +
 gcc/testsuite/g++.old-deja/g++.law/nest3.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.law/operators32.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.law/operators4.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.law/vbase1.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.law/virtual3.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility1.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility10.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility13.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility17.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility2.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility22.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility25.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.law/visibility7.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.martin/new1.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/eh13.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/eh2.C          |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/net34.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/net46.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/p658.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/rtti1.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.ns/using4.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.ns/using6.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.other/defarg6.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.other/headers1.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.other/init9.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.other/inline14.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.other/inline2.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.other/inline7.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.other/inline8.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.other/optimize2.C   |    1 +
 gcc/testsuite/g++.old-deja/g++.other/sibcall1.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.other/unchanging1.C |    1 +
 gcc/testsuite/g++.old-deja/g++.pt/crash68.C        |    1 +
 gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb109.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb113.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb115.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb124.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb127.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb129.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C    |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb130.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb132.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb15.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb21.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb24.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb27.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb28.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb29.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb3.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb30.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb31.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb33.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb36.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb39.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb4.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb41.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb43.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb44.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb46.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb54.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb55.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb59.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb60.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb62.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb66.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb7.C       |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb73.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb77.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.robertl/eb79.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.warn/iomanip.C      |    1 +
 gcc/testsuite/lib/target-supports.exp              |   18 ++++++++++++++++++
 559 files changed, 584 insertions(+), 2 deletions(-)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index c20af31c64237..5cd53d7b56de3 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2700,6 +2700,10 @@ Target is @samp{freestanding} as defined in section 4 of the C99 standard.
 Effectively, it is a target which supports no extra headers or libraries
 other than what is considered essential.
 
+@item hostedlib
+Target is not @samp{freestanding}, and, if the language is C++,
+@code{libstdc++}'s hosted mode is not disabled.
+
 @item gettimeofday
 Target supports @code{gettimeofday}.
 
diff --git a/gcc/testsuite/c-c++-common/pr36513-2.c b/gcc/testsuite/c-c++-common/pr36513-2.c
index d81c81dd4da08..f2e13227447be 100644
--- a/gcc/testsuite/c-c++-common/pr36513-2.c
+++ b/gcc/testsuite/c-c++-common/pr36513-2.c
@@ -1,6 +1,7 @@
 /* PR 36513: -Wlogical-op warns about strchr */
 /* { dg-do compile } */
 /* { dg-options "-Wlogical-op" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 #ifdef __cplusplus
 #include <cstring>
 #else 
diff --git a/gcc/testsuite/g++.dg/analyzer/pr93212.C b/gcc/testsuite/g++.dg/analyzer/pr93212.C
index 1029e8d547ba8..0c7c134d262aa 100644
--- a/gcc/testsuite/g++.dg/analyzer/pr93212.C
+++ b/gcc/testsuite/g++.dg/analyzer/pr93212.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 auto lol()
diff --git a/gcc/testsuite/g++.dg/analyzer/vfunc-2.C b/gcc/testsuite/g++.dg/analyzer/vfunc-2.C
index 46b68e529e6a5..ba2ac652449da 100644
--- a/gcc/testsuite/g++.dg/analyzer/vfunc-2.C
+++ b/gcc/testsuite/g++.dg/analyzer/vfunc-2.C
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 #include <cstdlib>
 
diff --git a/gcc/testsuite/g++.dg/concepts/expression.C b/gcc/testsuite/g++.dg/concepts/expression.C
index 3da0c962888a6..c2be18ae15ec5 100644
--- a/gcc/testsuite/g++.dg/concepts/expression.C
+++ b/gcc/testsuite/g++.dg/concepts/expression.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++17_only } }
 // { dg-options "-fconcepts-ts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 // TODO: ICE on gimplify 16?
 
diff --git a/gcc/testsuite/g++.dg/concepts/fn3.C b/gcc/testsuite/g++.dg/concepts/fn3.C
index 3e076f62ee881..793ff6693db30 100644
--- a/gcc/testsuite/g++.dg/concepts/fn3.C
+++ b/gcc/testsuite/g++.dg/concepts/fn3.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++17_only } }
 // { dg-options "-fconcepts-ts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/concepts/fn9.C b/gcc/testsuite/g++.dg/concepts/fn9.C
index 51edd2fc539d2..8b0dee762e868 100644
--- a/gcc/testsuite/g++.dg/concepts/fn9.C
+++ b/gcc/testsuite/g++.dg/concepts/fn9.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++17_only } }
 // { dg-options "-fconcepts-ts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn.C b/gcc/testsuite/g++.dg/concepts/generic-fn.C
index 983b37092f8f0..0ffd30c8a0128 100644
--- a/gcc/testsuite/g++.dg/concepts/generic-fn.C
+++ b/gcc/testsuite/g++.dg/concepts/generic-fn.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++17_only } }
 // { dg-options "-fconcepts-ts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <type_traits>
diff --git a/gcc/testsuite/g++.dg/concepts/intro2.C b/gcc/testsuite/g++.dg/concepts/intro2.C
index 5c6906c8d352f..35911c6e5e205 100644
--- a/gcc/testsuite/g++.dg/concepts/intro2.C
+++ b/gcc/testsuite/g++.dg/concepts/intro2.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++17_only } }
 // { dg-options "-fconcepts-ts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-access1.C b/gcc/testsuite/g++.dg/contracts/contracts-access1.C
index fdad7b1763c0d..7af28e45e2298 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-access1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-access1.C
@@ -2,6 +2,7 @@
 // members of the current and base classes
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 struct Base
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-assume2.C b/gcc/testsuite/g++.dg/contracts/contracts-assume2.C
index 3323244fefb69..8b2f7218d1e2b 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-assume2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-assume2.C
@@ -10,6 +10,7 @@
 // main -- unlike contracts-ignore2 which expects a failing return code
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-role=default:never,assume,ignore -O1" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 int fun(int x) {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-assume3.C b/gcc/testsuite/g++.dg/contracts/contracts-assume3.C
index 8dad6bb562e5f..ae6845a3c48a0 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-assume3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-assume3.C
@@ -2,6 +2,7 @@
 // a link failure
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int f(int t);
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-assume4.C b/gcc/testsuite/g++.dg/contracts/contracts-assume4.C
index 7954f53161219..6d06403a5c9fe 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-assume4.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-assume4.C
@@ -2,6 +2,7 @@
 // not cause constexpr eval failure
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 constexpr int f(int t); // { dg-warning "used but never defined" }
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-config1.C b/gcc/testsuite/g++.dg/contracts/contracts-config1.C
index 2f4fa3df6e15f..fa702d5e1b082 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-config1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-config1.C
@@ -2,6 +2,7 @@
 // contract configurations is correct.
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-role=default:maybe,maybe,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int fun(int n)
   [[ post default r: r > 0 ]]
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C b/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C
index 9d0233ba9d7e4..0bf004f309c18 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C
@@ -2,6 +2,7 @@
 // ensure that failing pre/post generate an error at runtime in constexpr funcs
 // { dg-do run }
 // { dg-options "-std=c++20 -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 constexpr int wfun(int a)
   [[ pre: a > 0 ]]
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C b/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C
index e67ba36a93e30..042a9c0b437e5 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C
@@ -1,6 +1,7 @@
 // check that contracts work around deduced return types
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 auto g0(int a) [[ pre: a < 0 ]] [[ post r: r > 0 ]]
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-externC.C b/gcc/testsuite/g++.dg/contracts/contracts-externC.C
index 873056b742bb4..f27eb4365d8c6 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-externC.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-externC.C
@@ -2,6 +2,7 @@
 // when wrapping functions in pre- and postconditions.
 // { dg-do link }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 volatile int x = 10;
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-friend1.C b/gcc/testsuite/g++.dg/contracts/contracts-friend1.C
index 28e269ffce9a9..f48a12d8341a6 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-friend1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-friend1.C
@@ -1,6 +1,7 @@
 // ensure contracts on friend declarations are a complete class context
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 struct X {
   friend void fn0(X x) [[ pre: x.a > 0 ]] { }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-ignore2.C b/gcc/testsuite/g++.dg/contracts/contracts-ignore2.C
index 5cf800a355952..c085852a3f28b 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-ignore2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-ignore2.C
@@ -2,6 +2,7 @@
 // assumptions; see contracts-assume2 for the assumed case
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 int fun(int x) {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-multiline1.C b/gcc/testsuite/g++.dg/contracts/contracts-multiline1.C
index c58747724f5ac..ec6b2c9dd91c6 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-multiline1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-multiline1.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main(int, char **)
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-nested-class2.C b/gcc/testsuite/g++.dg/contracts/contracts-nested-class2.C
index 43e75edbef805..f058938ee8fd7 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-nested-class2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-nested-class2.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 void gfn3(int n) [[ pre: n > 0 ]];
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-post2.C b/gcc/testsuite/g++.dg/contracts/contracts-post2.C
index 7665f82910709..5255d2b83c325 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-post2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-post2.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int f1(int n)
   [[post r: r == n]]
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-post3.C b/gcc/testsuite/g++.dg/contracts/contracts-post3.C
index 129232827960a..38f9e64d5d846 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-post3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-post3.C
@@ -2,6 +2,7 @@
 // { dg-options "-std=c++2a -fcontracts" }
 // { dg-shouldfail "assert violation" }
 // { dg-output "contract violation in function f1" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int f1(int n)
   [[post r: r > n]]
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre10.C b/gcc/testsuite/g++.dg/contracts/contracts-pre10.C
index fe855661b97b6..d0d5633335976 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre10.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre10.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 struct M
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre2.C b/gcc/testsuite/g++.dg/contracts/contracts-pre2.C
index d63d0712ff91b..c7441dcda708e 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre2.C
@@ -1,6 +1,7 @@
 // basic test to ensure pre contracts work for free functions
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 namespace nullary
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C b/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C
index f4319bf1bff4e..e692cde53bddd 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C
@@ -1,6 +1,7 @@
 // basic test to ensure contracts work pre-c++2a
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int f(int n)
   [[ pre: n > 0 ]]
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre3.C b/gcc/testsuite/g++.dg/contracts/contracts-pre3.C
index 70df31864f984..e789186ced8a9 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre3.C
@@ -1,6 +1,7 @@
 // tests to ensure pre contracts work on member functions
 // { dg-do compile }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 namespace member
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre4.C b/gcc/testsuite/g++.dg/contracts/contracts-pre4.C
index ec26c02bff3d5..376df745d664d 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre4.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre4.C
@@ -1,6 +1,7 @@
 // test that contracts on overriding functions are found correctly
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 struct Base
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre5.C b/gcc/testsuite/g++.dg/contracts/contracts-pre5.C
index 5030cec3c3cd7..cadab449d0240 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre5.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre5.C
@@ -1,6 +1,7 @@
 // basic test to ensure pre contracts work for free templates
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 template<typename T>
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre7.C b/gcc/testsuite/g++.dg/contracts/contracts-pre7.C
index 715a2c692cb0b..5c7756a811253 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre7.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre7.C
@@ -2,6 +2,7 @@
 // unchecked function after leaving a (possibly nested) namespace
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 namespace ns0
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre9.C b/gcc/testsuite/g++.dg/contracts/contracts-pre9.C
index 4613be4e94713..879c7f8fc2b0c 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre9.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre9.C
@@ -2,6 +2,7 @@
 // with guarded members
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 template<typename T>
 struct S
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C
index ef6b1236ded65..90c08393ff0a8 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C
@@ -1,6 +1,7 @@
 // basic test to ensure contracts generalized redecl works
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 namespace defining
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C
index e0a0c696f73cb..9e82c6cf9318f 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C
@@ -2,6 +2,7 @@
 // normal default parm handling
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 int f(int a, int, int c = 10);
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C
index 131f039e406ea..18056a0e387e5 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C
@@ -1,6 +1,7 @@
 // basic test to ensure contracts generalized redecl works
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 namespace defining
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C
index b7999b4bd7bb7..c3aaab139bdb9 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C
@@ -1,6 +1,7 @@
 // test that contracts can be added during (defining) friend declarations
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 struct T;
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C
index 1460b93479ebc..b3e3821050146 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C
@@ -1,6 +1,7 @@
 // basic test to ensure pre contracts work for free template specializations
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 template<typename T>
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C
index 82117671b2d37..85ee1eeeab6cb 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C
@@ -1,6 +1,7 @@
 // basic test to ensure contracts work for class and member specializations
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 // template specializations can have differing contracts
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C
index 090c1349f98d6..cf07196ba8837 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 template<typename T, typename S>
diff --git a/gcc/testsuite/g++.dg/contracts/contracts10.C b/gcc/testsuite/g++.dg/contracts/contracts10.C
index 585af9918df4a..1860bee0499d1 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts10.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts10.C
@@ -4,6 +4,7 @@
 // predicate, and contract level are included in the violation_info object
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-build-level=audit -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 namespace tns
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts14.C b/gcc/testsuite/g++.dg/contracts/contracts14.C
index d9156d6875dd2..e9b27911ffc82 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts14.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts14.C
@@ -2,6 +2,7 @@
 // are catchable up the call stack
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <experimental/contract>
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts15.C b/gcc/testsuite/g++.dg/contracts/contracts15.C
index ef52a0e67f036..5a6b7f45d5bf1 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts15.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts15.C
@@ -2,6 +2,7 @@
 // are not catchable up the call stack when failing in a noexcept function
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <experimental/contract>
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts16.C b/gcc/testsuite/g++.dg/contracts/contracts16.C
index 5d58ab8eaa15c..a4e1af5ec5c3f 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts16.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts16.C
@@ -2,6 +2,7 @@
 // are not catchable up the call stack even when continue mode is off
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <experimental/contract>
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts17.C b/gcc/testsuite/g++.dg/contracts/contracts17.C
index f2db43346e4e3..4a97db96d0147 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts17.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts17.C
@@ -3,6 +3,7 @@
 // assert fails in a noexcept function
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <experimental/contract>
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts18.C b/gcc/testsuite/g++.dg/contracts/contracts18.C
index e8163ba4ab2dc..1676ea458a70f 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts18.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts18.C
@@ -3,6 +3,7 @@
 //   (axiom level contracts are never checked at runtime)
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-role=custom:never,ignore,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts19.C b/gcc/testsuite/g++.dg/contracts/contracts19.C
index 009942de967ec..7b168cfa4dcb3 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts19.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts19.C
@@ -3,6 +3,7 @@
 //   (axiom level contracts are never checked at runtime)
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-role=custom:maybe,maybe,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts2.C b/gcc/testsuite/g++.dg/contracts/contracts2.C
index 9535e077d3615..0de587e860639 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts2.C
@@ -3,6 +3,7 @@
 //   (axiom level contracts are never checked at runtime)
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts22.C b/gcc/testsuite/g++.dg/contracts/contracts22.C
index 91e32b9d9b25b..df71f924c5f23 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts22.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts22.C
@@ -3,6 +3,7 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-mode=off" }
 // { dg-output "returning from main" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 int constexpr f()
diff --git a/gcc/testsuite/g++.dg/contracts/contracts24.C b/gcc/testsuite/g++.dg/contracts/contracts24.C
index 70a54f95a937e..0157097f3ba5a 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts24.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts24.C
@@ -3,6 +3,7 @@
 //   (axiom level contracts are never checked at runtime)
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-semantic=default:never -fcontract-semantic=audit:ignore -fcontract-semantic=axiom:ignore" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts25.C b/gcc/testsuite/g++.dg/contracts/contracts25.C
index e954cd1389b2a..b1dbc8bb088ab 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts25.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts25.C
@@ -2,6 +2,7 @@
 // ensure that failing asserts generate an error at runtime in constexpr funcs
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 constexpr int wfun(int a) {
   [[assert: a > 0]];
diff --git a/gcc/testsuite/g++.dg/contracts/contracts3.C b/gcc/testsuite/g++.dg/contracts/contracts3.C
index 73dc7a155440d..5efa4c0b58f34 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts3.C
@@ -4,6 +4,7 @@
 // { dg-options "-std=c++2a -fcontracts" }
 // { dg-shouldfail "assert violation" }
 // { dg-output "contract violation in function main" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts35.C b/gcc/testsuite/g++.dg/contracts/contracts35.C
index 4435ab78e5065..2c3dd31ba4fde 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts35.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts35.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <cstdio>
 
 struct S
diff --git a/gcc/testsuite/g++.dg/contracts/contracts4.C b/gcc/testsuite/g++.dg/contracts/contracts4.C
index a43fb9f98e26d..d3231e50c3324 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts4.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts4.C
@@ -2,6 +2,7 @@
 // error during runtime when the contract build level is default
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts5.C b/gcc/testsuite/g++.dg/contracts/contracts5.C
index 3c591833bf197..ecd854a4dc686 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts5.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts5.C
@@ -4,6 +4,7 @@
 // { dg-options "-std=c++2a -fcontracts -fcontract-build-level=audit" }
 // { dg-shouldfail "assert violation" }
 // { dg-output "contract violation in function main" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts6.C b/gcc/testsuite/g++.dg/contracts/contracts6.C
index 59c010e5d390d..42622fd2e186f 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts6.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts6.C
@@ -2,6 +2,7 @@
 // error during runtime when the contract build level is off
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-build-level=off" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts7.C b/gcc/testsuite/g++.dg/contracts/contracts7.C
index 9e7cae9433efe..0828f8274b304 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts7.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts7.C
@@ -5,6 +5,7 @@
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
 // { dg-output "contract violation in function main" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/contracts/contracts9.C b/gcc/testsuite/g++.dg/contracts/contracts9.C
index 09a1a6532c5a0..37a2c6e685548 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts9.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts9.C
@@ -4,6 +4,7 @@
 // ensure that template functions can be used as assert predicates
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 template<typename T>
 int fun1(int a, T b)
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100611.C b/gcc/testsuite/g++.dg/coroutines/pr100611.C
index 14edf4870a145..9f0228e098cbc 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100611.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100611.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 /*
   Test that instances created in capture clauses within co_await statements do not
   get 'promoted'. This would lead to the members destructor getting called more
diff --git a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
index 4ef80a9959490..5ffd3a427c109 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr100772-b.C
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #if !__has_include(<coroutine>) \
   && __has_include(<experimental/coroutine>) // for __clang__
 #include <experimental/coroutine>
diff --git a/gcc/testsuite/g++.dg/coroutines/pr101133.C b/gcc/testsuite/g++.dg/coroutines/pr101133.C
index 6c6bc163251c4..5bc9103897cbe 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr101133.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr101133.C
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 #include <coroutine>
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/coroutines/pr101367.C b/gcc/testsuite/g++.dg/coroutines/pr101367.C
index 0a9e5bee7d170..435190eca7ddc 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr101367.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr101367.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 #include <coroutine>
 using namespace std;
diff --git a/gcc/testsuite/g++.dg/coroutines/pr101765.C b/gcc/testsuite/g++.dg/coroutines/pr101765.C
index 49a49d1129950..4a35c1c55f6b2 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr101765.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr101765.C
@@ -1,6 +1,7 @@
 // We cannot compile this yet, much run it - but one day it might be
 // feasible, so do the minimum for now.
 // { dg-additional-options " -fsyntax-only -Wno-vla" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/pr101976.C b/gcc/testsuite/g++.dg/coroutines/pr101976.C
index 1854ba001bb37..53d02a4c4e03a 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr101976.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr101976.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 /*
   Test that members of temporary instances in co_await statements do not get
diff --git a/gcc/testsuite/g++.dg/coroutines/pr102454.C b/gcc/testsuite/g++.dg/coroutines/pr102454.C
index 41aeda7b97353..9cb59dbc19436 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr102454.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr102454.C
@@ -1,4 +1,5 @@
 //  { dg-additional-options "-fno-exceptions" }
+//  { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <coroutine>
 #include <string>
diff --git a/gcc/testsuite/g++.dg/coroutines/pr104051.C b/gcc/testsuite/g++.dg/coroutines/pr104051.C
index ce7ae55405a6e..f77a915af7457 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr104051.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr104051.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fsyntax-only" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <coroutine>
 #include <vector>
 template <typename> struct promise {
diff --git a/gcc/testsuite/g++.dg/coroutines/pr94288.C b/gcc/testsuite/g++.dg/coroutines/pr94288.C
index 2557e3e0f2bb1..61424aee99bbf 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr94288.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr94288.C
@@ -1,4 +1,5 @@
 //  { dg-additional-options  "-w" }
+//  { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include "coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/pr95477.C b/gcc/testsuite/g++.dg/coroutines/pr95477.C
index 7050aee00781f..38fb5c80b072f 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr95477.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr95477.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/pr95520.C b/gcc/testsuite/g++.dg/coroutines/pr95520.C
index 4849b0789c7fb..9776ec57911ed 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr95520.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr95520.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-output "coroutine name: MyFoo" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #include <coroutine>
 #include <cstdio>
 
diff --git a/gcc/testsuite/g++.dg/coroutines/pr95599.C b/gcc/testsuite/g++.dg/coroutines/pr95599.C
index ec97a4aa16510..e94bf7d9752c9 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr95599.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr95599.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // The simplest co_await we can do.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/pr95711.C b/gcc/testsuite/g++.dg/coroutines/pr95711.C
index 682a221509ea6..ba663ec1544c2 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr95711.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr95711.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #if __has_include(<coroutine>)
 #include <coroutine>
diff --git a/gcc/testsuite/g++.dg/coroutines/pr95736.C b/gcc/testsuite/g++.dg/coroutines/pr95736.C
index 0be5168a8d227..55f52bf4e8636 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr95736.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr95736.C
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <exception>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/coroutines/pr97587.C b/gcc/testsuite/g++.dg/coroutines/pr97587.C
index 081c3a94b3c03..03da6c3092364 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr97587.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr97587.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include<cassert>
 #include<coroutine>
diff --git a/gcc/testsuite/g++.dg/coroutines/pr99576_1.C b/gcc/testsuite/g++.dg/coroutines/pr99576_1.C
index 612f0cda2b184..01db4d21424fb 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr99576_1.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr99576_1.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 /*
   Test that instances created in capture clauses within co_await statements do not get
   'promoted'. This would lead to their members destructors getting called more
diff --git a/gcc/testsuite/g++.dg/coroutines/pr99576_2.C b/gcc/testsuite/g++.dg/coroutines/pr99576_2.C
index b7371d64480e9..cd3da6426e239 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr99576_2.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr99576_2.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 /*
   Test that members of temporary awaitables in co_await statements do not get
   'promoted'. This would lead to the members destructor getting called more
diff --git a/gcc/testsuite/g++.dg/coroutines/ramp-return-a.C b/gcc/testsuite/g++.dg/coroutines/ramp-return-a.C
index c6e445e0529a6..fcea6f9975f8f 100644
--- a/gcc/testsuite/g++.dg/coroutines/ramp-return-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/ramp-return-a.C
@@ -1,4 +1,5 @@
 //  { dg-additional-options "-std=c++14" }
+//  { dg-skip-if "requires hosted libstdc++ for vector in ramp-return.h" { ! hostedlib } }
 
 #include "ramp-return.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/ramp-return-b.C b/gcc/testsuite/g++.dg/coroutines/ramp-return-b.C
index d0e5d1f3c7f54..2ab457abd94c7 100644
--- a/gcc/testsuite/g++.dg/coroutines/ramp-return-b.C
+++ b/gcc/testsuite/g++.dg/coroutines/ramp-return-b.C
@@ -1,4 +1,5 @@
 //  { dg-options "-fcoroutines -std=c++14" }
+//  { dg-skip-if "requires hosted libstdc++ for vector in ramp-return.h" { ! hostedlib } }
 #define DELETE_COPY_CTOR 1
 #include "ramp-return.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/ramp-return-c.C b/gcc/testsuite/g++.dg/coroutines/ramp-return-c.C
index e030ca1b7aeba..0992924b43431 100644
--- a/gcc/testsuite/g++.dg/coroutines/ramp-return-c.C
+++ b/gcc/testsuite/g++.dg/coroutines/ramp-return-c.C
@@ -1,4 +1,5 @@
 //  { dg-additional-options "-std=c++17" }
+//  { dg-skip-if "requires hosted libstdc++ for vector in ramp-return.h" { ! hostedlib } }
 #define DELETE_COPY_CTOR 1
 #include "ramp-return.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C b/gcc/testsuite/g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C
index ca07a3a03d00b..72ba97c5ac471 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* check the code-gen for the failed alloc return.
    Here we use an allocator that doesn't fail so that the code
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/alloc-01-overload-newdel.C b/gcc/testsuite/g++.dg/coroutines/torture/alloc-01-overload-newdel.C
index 98babcaf4f4b8..0e7c8555fc95c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/alloc-01-overload-newdel.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/alloc-01-overload-newdel.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // check codegen for overloaded simple operator new/delete.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C b/gcc/testsuite/g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C
index 7911cc8c43dfd..61e19bd072729 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* check the code-gen for the failed alloc return.
    In this case, we use an operator new that always fails.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/alloc-03-overload-new-1.C b/gcc/testsuite/g++.dg/coroutines/torture/alloc-03-overload-new-1.C
index b1d6743fd9124..3ae446fecf6b4 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/alloc-03-overload-new-1.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/alloc-03-overload-new-1.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* check codegen for overloaded simple operator new/delete.
    here check that we prefer the overload that accounts the function
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C b/gcc/testsuite/g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C
index 2987c6ef116f7..a6b48729a56b5 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* check that we use the deallocation function with two args when both
    are available.  */
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/call-00-co-aw-arg.C b/gcc/testsuite/g++.dg/coroutines/torture/call-00-co-aw-arg.C
index 19e3ec1fe6877..f86bbc78871d2 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/call-00-co-aw-arg.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/call-00-co-aw-arg.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check that we can use co_await as a call parm.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/call-01-multiple-co-aw.C b/gcc/testsuite/g++.dg/coroutines/torture/call-01-multiple-co-aw.C
index 573f4f86a522e..29ba751d4272b 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/call-01-multiple-co-aw.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/call-01-multiple-co-aw.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check that we can use multiple co_awaits as a call parm.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/call-02-temp-co-aw.C b/gcc/testsuite/g++.dg/coroutines/torture/call-02-temp-co-aw.C
index 8ae07aa7a4567..322cde107a611 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/call-02-temp-co-aw.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/call-02-temp-co-aw.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check  foo (compiler temp, co_await).
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C b/gcc/testsuite/g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C
index 967cb1b9baa14..f42c96af2821e 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check  foo (compiler temp, co_await).
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-00-co-ret.C b/gcc/testsuite/g++.dg/coroutines/torture/class-00-co-ret.C
index 932fe4b2830f3..bce831e98b7ed 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-00-co-ret.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-00-co-ret.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Simplest class.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-01-co-ret-parm.C b/gcc/testsuite/g++.dg/coroutines/torture/class-01-co-ret-parm.C
index 0bd477044b4ce..b9398e858c7d4 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-01-co-ret-parm.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-01-co-ret-parm.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Class with parm capture
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-02-templ-parm.C b/gcc/testsuite/g++.dg/coroutines/torture/class-02-templ-parm.C
index 0cc6069c32f6a..02ad0faa8c072 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-02-templ-parm.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-02-templ-parm.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // template parm in a class
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-03-operator-templ-parm.C b/gcc/testsuite/g++.dg/coroutines/torture/class-03-operator-templ-parm.C
index 2d888a745586c..e91f068efd2d2 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-03-operator-templ-parm.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-03-operator-templ-parm.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // template parm in a class
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-04-lambda-1.C b/gcc/testsuite/g++.dg/coroutines/torture/class-04-lambda-1.C
index e191c20ac0611..9c776289b99e9 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-04-lambda-1.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-04-lambda-1.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // template parm in a class
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C b/gcc/testsuite/g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C
index 9bb76d246c3b6..1f7e2a63f9589 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // template parm in a class
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-06-lambda-capture-ref.C b/gcc/testsuite/g++.dg/coroutines/torture/class-06-lambda-capture-ref.C
index db60132b0eed1..33dde7914e2a6 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-06-lambda-capture-ref.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-06-lambda-capture-ref.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // template parm in a class
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/class-07-data-member.C b/gcc/testsuite/g++.dg/coroutines/torture/class-07-data-member.C
index 00a0df69758eb..86d946c7b357f 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/class-07-data-member.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/class-07-data-member.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Show that we are correctly accessing class variables.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-00-trivial.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-00-trivial.C
index 6de751af53c1b..0f09162ae7d23 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-00-trivial.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-00-trivial.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // The simplest co_await we can do.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-01-with-value.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-01-with-value.C
index ddff64530b3d9..070a05ac178e1 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-01-with-value.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-01-with-value.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* The simplest valued co_await we can do.  */
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-02-xform.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-02-xform.C
index 8d32c73503f9a..74f1a10c1fb0c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-02-xform.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-02-xform.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test of basic await transform, no local state.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-03-rhs-op.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-03-rhs-op.C
index 29dcc5f7a2cd2..3fb8167115bc9 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-03-rhs-op.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-03-rhs-op.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Basic check of co_await with an expression to await transform.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-04-control-flow.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-04-control-flow.C
index fd201f904816d..e3f6ee436cbeb 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-04-control-flow.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-04-control-flow.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check correct operation of await transform.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-05-loop.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-05-loop.C
index 58cdced7313f0..33716288c2ef9 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-05-loop.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-05-loop.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check correct operation of co_await in a loop without local state.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-06-ovl.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-06-ovl.C
index a3f7fa0083b61..4cb8eb7ea4e73 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-06-ovl.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-06-ovl.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Basic check of the co_await operator overload.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-07-tmpl.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-07-tmpl.C
index 8915786dd1efc..27358cb951092 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-07-tmpl.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-07-tmpl.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check that we correctly operate when the coroutine object is templated.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-08-cascade.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-08-cascade.C
index 51eedc57421e1..a3efa473b6983 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-08-cascade.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-08-cascade.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check cascaded co_await operations.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-09-pair.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-09-pair.C
index e3aba4d56ef88..fc4ce7c62d3e3 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-09-pair.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-09-pair.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-10-template-fn-arg.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-10-template-fn-arg.C
index 71a5b18c3ccb4..3e4fe3662f11d 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-10-template-fn-arg.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-10-template-fn-arg.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check type dependent function parms. 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-11-forwarding.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-11-forwarding.C
index 6e59c88447b14..1ff4eb09e2069 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-11-forwarding.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-11-forwarding.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test of forwarding a templated awaitable to co_await.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-12-operator-2.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-12-operator-2.C
index 91dd1927bfd04..4b3e9334f3db5 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-12-operator-2.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-12-operator-2.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Basic check of the co_await operator overload.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-13-return-ref.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-13-return-ref.C
index 78f2d5b9d1b98..12e6c06377765 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-13-return-ref.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-13-return-ref.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* The simplest valued co_await we can do.  */
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C
index 6b1d5bf5a4363..3d133ce2aa9f3 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* The simplest valued co_await we can do.  */
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-15-return-non-triv.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-15-return-non-triv.C
index 70c974bc56a6c..e79d9da6b64de 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-15-return-non-triv.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-15-return-non-triv.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 /* Check that we handle await_resume for a non-trivial type.  */
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-16-template-traits.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-16-template-traits.C
index 4e670b1c308a2..8be2597fffbb1 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-16-template-traits.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-16-template-traits.C
@@ -1,4 +1,5 @@
 //  { dg-do compile }
+//  { dg-skip-if "requires hosted libstdc++ for chrono" { ! hostedlib } }
 //  Test we create co_await_expr with dependent type rather than type of awaitable class
 
 #include "../coro.h"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C
index 3eefe9e775da0..5a7b9fd076167 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C
@@ -1,4 +1,5 @@
 //  { dg-do run { target c++17 } }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-18-if-cond.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-18-if-cond.C
index 6b05cfb44acde..3c5436028023d 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-18-if-cond.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-18-if-cond.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in if condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-19-while-cond.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-19-while-cond.C
index 2cd37616aaa4d..1b7f09d93e5ea 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-19-while-cond.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-19-while-cond.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in while condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-20-do-while-cond.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-20-do-while-cond.C
index bb1e97a6ef062..d4743e2a548b5 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-20-do-while-cond.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-20-do-while-cond.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in do-while conditional
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-21-switch-value.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-21-switch-value.C
index b5e1bf38050e1..beaf12f4782b8 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-21-switch-value.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-21-switch-value.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in while condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C
index 54659741cbedd..dee0a99c4b3be 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in while condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C
index 1bf2f6d912deb..45ea0de743018 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in while condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C
index 2208e3415746d..08d17a5e8891e 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in while condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C
index f361fb5ecea24..b4ee6acf06e63 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co-await in while condition.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C
index dd0a3b749aace..016db878ad51e 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Basic functionality check, co_return.
 // Here we check the case that initial suspend is "never", so that the co-
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C
index 1f4c3debc03b8..2f388b5f53268 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Basic functionality check, co_return.
 // Here we check the case that initial suspend is "always".
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C
index 1a095c627ea3c..871307d3b1948 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // GRO differs from the eventual return type.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C
index abb789aa7aeca..928193ac8437a 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // GRO differs from eventual return type and has non-trivial dtor.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-05-return-value.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-05-return-value.C
index 42b80ff6bb614..dbf5c973fe32b 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-05-return-value.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-05-return-value.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test returning an int.
 // We will use the promise to contain this to avoid having to include
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C
index 91f591a30fc50..0a8b90063a4c5 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test returning a T.
 // We will use the promise to contain this to avoid having to include
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C
index b1a06f284958b..8eedbfac6f179 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check that "co_return (void)expression;" evaluates expression once.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C
index ac4cca49e9809..c05806e31ef25 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test templated co-return.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C
index 33683226f632d..98a822189a5fe 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // test boolean return from await_suspend ().
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C
index 7b07be5f4482a..90d99efdd34bb 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check that "co_return expression;" only evaluates expression once.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C
index 06939107d8006..f69a99a3f996c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check co_return co_await 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C
index 50124c080b339..516b89bc6e170 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check co_return function (co_await)
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-13-template-2.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-13-template-2.C
index 9d4a4de8ebe8a..f3aee4977309c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-13-template-2.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-13-template-2.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check type dependent function parms. 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-14-template-3.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-14-template-3.C
index ebc1adba821f7..3dfa6caa66ec7 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-14-template-3.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-14-template-3.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check type dependent function parms. 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-15-default-return_void.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-15-default-return_void.C
index 300052c94ae79..81a7da276ac61 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-15-default-return_void.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-15-default-return_void.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++17 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 //
 // Check if default return_void is insert at correct position.
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C
index 112aa57ca61e1..d7bd00e024236 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test returning an int.
 // We will use the promise to contain this to avoid having to include
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C
index 9c9d2fa816dd7..6625e4476cb9c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test the ability to specialize the coroutine traits to include
 // non-class type coroutine ramp return values.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-00-triv.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-00-triv.C
index 15e390ed2008c..3d88c37ed57f6 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-00-triv.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-00-triv.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test yielding an int.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-01-multi.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-01-multi.C
index 5df69c7f15673..e1c5fba294df6 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-01-multi.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-01-multi.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test yielding an int.
 // We will use the promise to contain this to avoid having to include
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-02-loop.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-02-loop.C
index 8d4f1d5d82368..f21e30495731e 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-02-loop.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-02-loop.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co_yield in a loop with no local state.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl.C
index 45fc8d71a0791..005423fa69b40 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co_yield in templated code.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-04-complex-local-state.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-04-complex-local-state.C
index f97bd2377f7be..f4b1b9f55ad88 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-04-complex-local-state.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-04-complex-local-state.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // using non-trivial types in the coro.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-05-co-aw.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-05-co-aw.C
index 043f97b6e1b32..bf2f910170211 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-05-co-aw.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-05-co-aw.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check co_return co_await 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-06-fun-parm.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-06-fun-parm.C
index c74e44d15d521..9cf148b76838b 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-06-fun-parm.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-06-fun-parm.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check co_return co_await 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-07-template-fn-param.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-07-template-fn-param.C
index 74dae6339556a..ab392a2a105f5 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-07-template-fn-param.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-07-template-fn-param.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check type dependent function parms. 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-08-more-refs.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-08-more-refs.C
index 8e39127a1ae79..d2a82bf441035 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-08-more-refs.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-08-more-refs.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check co_return co_await 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C
index 3abbe1c43abb2..943c869a58b51 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check co_return co_await 
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-0.C b/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-0.C
index 85135fc50c42d..42480a03b88cf 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-0.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-0.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test exceptions.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C b/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C
index 6433b62109fcc..e4303dab6a211 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test exceptions in the initial await expression, per n4849.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/extern-c-coroutine.C b/gcc/testsuite/g++.dg/coroutines/torture/extern-c-coroutine.C
index c178a80ee4b5a..c28a641bc2ade 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/extern-c-coroutine.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/extern-c-coroutine.C
@@ -1,3 +1,5 @@
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
+
 #include <coroutine>
 #include <cstdio>
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-00.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-00.C
index b5716972d4794..7fb169a6c7d4a 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-00.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-00.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test promise construction from function args list.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-01.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-01.C
index f530431a6bba4..5459d2a4e4943 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-01.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-01.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Simplest test that we correctly handle function params in the body
 // of the coroutine.  No local state, just the parm.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-02.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-02.C
index 396b438cb2d95..a9b99ca49393d 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-02.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-02.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test that we correctly re-write multiple uses of a function param
 // in the body.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-03.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-03.C
index bf699722a1ab9..6fc801ff29933 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-03.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-03.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test that we can use a function param in a co_xxxx status.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-04.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-04.C
index c90c1525e4010..a8189f4c40e84 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-04.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-04.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test that we can manage a constructed param copy.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-05.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-05.C
index 8bdb2b5d0f780..b853d97bfefbd 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-05.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-05.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test that we can manage a constructed param reference
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-06.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-06.C
index cbcfe67ff1af5..6953dcb46ed24 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-06.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-06.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // check references are handled as expected.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-07.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-07.C
index 7f3bb3cc7825e..03044ef4b3140 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-07.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-07.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test that we copy simple parms correctly by value, reference or
 // rvalue reference.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
index cce1521b22604..20f407d30cced 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // Check that we correctly handle params with non-trivial DTORs and
 // use the correct copy/move CTORs.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/func-params-09-awaitable-parms.C b/gcc/testsuite/g++.dg/coroutines/torture/func-params-09-awaitable-parms.C
index 81430bf4d5463..d852666925b1d 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/func-params-09-awaitable-parms.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/func-params-09-awaitable-parms.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // Check that we correctly handle params with non-trivial DTORs and
 // use the correct copy/move CTORs.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-00-co-ret.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-00-co-ret.C
index 61e284d5c8f5c..7b77cecec645c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-00-co-ret.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-00-co-ret.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Simplest lambda
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-01-co-ret-parm.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-01-co-ret-parm.C
index 378eedc6d89d9..925f1d0d5850d 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-01-co-ret-parm.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-01-co-ret-parm.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Lambda with parm
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-02-co-yield-values.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-02-co-yield-values.C
index a6f592cd77af2..20609ce831e0b 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-02-co-yield-values.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-02-co-yield-values.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // lambda with parm and local state
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-03-auto-parm-1.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-03-auto-parm-1.C
index bfa5400225da7..9c8ddf2a99258 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-03-auto-parm-1.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-03-auto-parm-1.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // generic Lambda with auto parm (c++14)
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-04-templ-parm.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-04-templ-parm.C
index adf31e22dbac5..ec8a9940d3a98 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-04-templ-parm.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-04-templ-parm.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-std=c++2a" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // generic Lambda with template parm (from c++20)
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-05-capture-copy-local.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-05-capture-copy-local.C
index 7cd6648cca69e..04dcfa26458ff 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-05-capture-copy-local.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-05-capture-copy-local.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // lambda with parm and local state
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-06-multi-capture.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-06-multi-capture.C
index 7b445d3d9cd03..c2f2e93dc669b 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-06-multi-capture.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-06-multi-capture.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // lambda with parm and local state
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-07-multi-yield.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-07-multi-yield.C
index 2bd58cbf2ec41..bc97507372ce2 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-07-multi-yield.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-07-multi-yield.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // lambda with parm and local state
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C
index 4d5a44fe29a49..bfce44f0c9e24 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test that we can use a function param in a co_xxxx status.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-09-init-captures.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-09-init-captures.C
index 920d6eaac82b9..ae7d9fa84c73c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-09-init-captures.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-09-init-captures.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // lambda with initialized captures
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/lambda-10-mutable.C b/gcc/testsuite/g++.dg/coroutines/torture/lambda-10-mutable.C
index a10816ccd8452..a7fa4c7a21faa 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/lambda-10-mutable.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/lambda-10-mutable.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // lambda with mutable closure object.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-00-const.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-00-const.C
index a8956457dcd3f..f6c44e9278de1 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-00-const.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-00-const.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Simplest local decl.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-01-single.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-01-single.C
index 69a5b707563c8..cd35d978814cf 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-01-single.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-01-single.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Simplest local var
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-02-conditional.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-02-conditional.C
index f232edabdae42..90aa008227bc2 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-02-conditional.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-02-conditional.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test local vars in nested scopes
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-03-with-awaits.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-03-with-awaits.C
index bd06db53d4832..f4209ab48d48c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-03-with-awaits.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-03-with-awaits.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test modifying a local var and yielding several instances of it.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C
index 419eb6b646735..b4c3f49bd59ad 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test modifying a local var across nested scopes containing vars
 // hiding those at outer scopes.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-05-awaitable.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-05-awaitable.C
index 7ea00434c8737..e7a8491ab1a4d 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-05-awaitable.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-05-awaitable.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // Test the case where the awaitables are local vars, and therefore already
 // have a frame representation - and should not be copied to a second frame
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/local-var-06-structured-binding.C b/gcc/testsuite/g++.dg/coroutines/torture/local-var-06-structured-binding.C
index 282aa7a7cac53..462ab51a755a9 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/local-var-06-structured-binding.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/local-var-06-structured-binding.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/mid-suspend-destruction-0.C b/gcc/testsuite/g++.dg/coroutines/torture/mid-suspend-destruction-0.C
index 0cbf93ad8afff..60852bb10a112 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/mid-suspend-destruction-0.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/mid-suspend-destruction-0.C
@@ -3,6 +3,7 @@
 // { dg-output "Destroyed coro1(\n|\r\n|\r)" }
 // { dg-output "Destroyed suspend_always_prt(\n|\r\n|\r)" }
 // { dg-output "Destroyed Promise(\n|\r\n|\r)" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Check that we still get the right DTORs run when we let a suspended coro
 // go out of scope.
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95003.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95003.C
index 9022dd2b1edd3..ada827e267df7 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95003.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95003.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 #include "../coro1-ret-int-yield-int.h"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-00-return_void.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-00-return_void.C
index 2952d0116749f..5d40ed414c4d1 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-00-return_void.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-00-return_void.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-01-initial-suspend.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-01-initial-suspend.C
index 346c20dbd8ff4..deb5a2275dc12 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-01-initial-suspend.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-01-initial-suspend.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-02-final_suspend.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-02-final_suspend.C
index 4200c333ee3d7..f1793b17624f0 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-02-final_suspend.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-02-final_suspend.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-03-return-value.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-03-return-value.C
index cf4c43d1a90d2..093d4f70b75e4 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-03-return-value.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-03-return-value.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-04-yield-value.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-04-yield-value.C
index 5f1be4e00f4fc..910be6bdc7f71 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-04-yield-value.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-04-yield-value.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-05-gro.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-05-gro.C
index 2e7218371bc07..28ecb32e463ba 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-05-gro.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-05-gro.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-06-grooaf.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-06-grooaf.C
index b6b6bd73c9aa8..ebea8d3513b49 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-06-grooaf.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-06-grooaf.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C
index be2a928ea00e3..3b9149ca17d92 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include "../coro.h"
 
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-01.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-01.C
index cf30c82be5edc..baae030c97d09 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-01.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-01.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cassert in pr95615.inc" { ! hostedlib } }
 
 #define INITIAL_SUSPEND_THROWS 1
 #include "pr95615.inc"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-02.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-02.C
index 7ec0f33f4859b..504c8b99f8c8b 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-02.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-02.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cassert in pr95615.inc" { ! hostedlib } }
 
 #define PROMISE_CTOR_THROWS 1
 #include "pr95615.inc"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-03.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-03.C
index 8053335428e83..90b6395c7934c 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-03.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-03.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cassert in pr95615.inc" { ! hostedlib } }
 
 #define GET_RETURN_OBJECT_THROWS 1
 #include "pr95615.inc"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-04.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-04.C
index db5c1285f9a01..1b7f89f815d26 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-04.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-04.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cassert in pr95615.inc" { ! hostedlib } }
 
 #define INITIAL_AWAIT_READY_THROWS 1
 #include "pr95615.inc"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-05.C b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-05.C
index 5fd62f67be457..1d302c88226b2 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr95615-05.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr95615-05.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cassert in pr95615.inc" { ! hostedlib } }
 
 #define INITIAL_AWAIT_SUSPEND_THROWS 1
 #include "pr95615.inc"
diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C b/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C
index 15db250b4a201..fc914c63ced89 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C
@@ -1,4 +1,5 @@
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 #include "../coro.h"
 
 #include <stdexcept>
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C b/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C
index b9b975b5dc2f9..bfa3c9e542fca 100644
--- a/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C
+++ b/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 // Make sure -Wliteral-suffix is enabled by default and
 // triggers as expected.
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wpessimizing-move2.C b/gcc/testsuite/g++.dg/cpp0x/Wpessimizing-move2.C
index 0ee6e0535dcbc..bec6c7ba4c7de 100644
--- a/gcc/testsuite/g++.dg/cpp0x/Wpessimizing-move2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/Wpessimizing-move2.C
@@ -1,6 +1,7 @@
 // PR c++/86981
 // { dg-do compile { target c++11 } }
 // { dg-options "-Wpessimizing-move" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <tuple>
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-70001-3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-70001-3.C
index 12c4c453e1af6..53287b173e8bc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-70001-3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-70001-3.C
@@ -2,6 +2,7 @@
 
 // This is still slow to compile, only run it once.
 // { dg-do compile { target c++14_only } }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <array>
 #include <complex>
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C
index 112415b655bfa..fd55e08ce5a3b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice16.C
@@ -1,5 +1,6 @@
 // PR c++/66635
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc5.C b/gcc/testsuite/g++.dg/cpp0x/dc5.C
index 57321626e9125..e4bdfd1a3a25f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/dc5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/dc5.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum35.C b/gcc/testsuite/g++.dg/cpp0x/enum35.C
index bcc1b26b39006..126fc7f1b0277 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum35.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum35.C
@@ -1,5 +1,6 @@
 // PR c++/82307
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum36.C b/gcc/testsuite/g++.dg/cpp0x/enum36.C
index 4859670309f82..e326942d9ebef 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum36.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum36.C
@@ -1,5 +1,6 @@
 // PR c++/82307
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-opt1.C b/gcc/testsuite/g++.dg/cpp0x/initlist-opt1.C
index 56de4bc00923f..391b7c47d503b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-opt1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-opt1.C
@@ -1,5 +1,6 @@
 // PR c++/110102
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 
 // { dg-error "deleted|construct_at" "" { target *-*-* } 0 }
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C b/gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C
index eec7d340fd1f0..eba0e171cd607 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C
@@ -1,5 +1,6 @@
 // PR c++/108195
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist13.C b/gcc/testsuite/g++.dg/cpp0x/initlist13.C
index bba226798ea39..2da89dcef79fe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist13.C
@@ -1,5 +1,6 @@
 // PR c++/39056
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <complex>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist15.C b/gcc/testsuite/g++.dg/cpp0x/initlist15.C
index acd04956b1bff..aaa01fb703537 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist15.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // Just discard errors pointing at header files
 // { dg-prune-output "include" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist25.C b/gcc/testsuite/g++.dg/cpp0x/initlist25.C
index dd41db1f641e1..0e110c5c2cf60 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist25.C
@@ -1,5 +1,6 @@
 // PR c++/41754
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } }
 
 #include <map>
 #include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist54.C b/gcc/testsuite/g++.dg/cpp0x/initlist54.C
index 52a8ff94d9913..b9dcd391f89a0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist54.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist54.C
@@ -1,5 +1,6 @@
 // PR c++/49355
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist92.C b/gcc/testsuite/g++.dg/cpp0x/initlist92.C
index 213b192d44111..85079123ccdd6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist92.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist92.C
@@ -1,5 +1,6 @@
 // PR c++/64665, DR 1467 
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C
index 9c9632cd5165d..9f7c7a860e830 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C
index 16fd0a713a785..3668a77c1148c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
index 28ea53363a57b..e1c3dac26b691 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C
index c6150f17456e9..9c639bf2ba17e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C
index b0e2d9fbabe17..26e681626e904 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C
index cff3d3756826c..40170899aed6f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C
index f2b54e58ad37b..bfa04c41bdb6b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
index d3f434195ea99..e934e33582d15 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C
index 2c6b0f2064468..2471adc6efbf5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C
index 3848938d55f04..a0f1a475444e7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C
index b5a335eaf13eb..66d8218cea3ce 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C
index 4a04cfbfb5893..c64e1800c3bde 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C
index 1aadbb490dcb0..b88b0eb6917bb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C
@@ -1,5 +1,6 @@
 // PR c++/54170
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert> 
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C
index d904ebee16b7c..5747766e8a31b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <algorithm>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C
index cbaeb16201f6a..f4b1c8ee9c035 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 //#include <iostream>
 #include <functional>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C
index 6b86369dbf24b..f0cc3c6b0bbcf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C
index def13fdd67b34..dbeaf2ca77257 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr20.C b/gcc/testsuite/g++.dg/cpp0x/nullptr20.C
index bbd0c7e24e3bc..985f50221d295 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr20.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 // Test passing to ellipisis
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr61038.C b/gcc/testsuite/g++.dg/cpp0x/pr61038.C
index 6c7a47bae737f..96aabe554b8aa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr61038.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr61038.C
@@ -1,5 +1,6 @@
 // PR c++/61038
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C b/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
index 09732d17cdd34..c06a3e6078d93 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 // PR c++/33235
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C
index 3093a7c055d11..95d49271b8115 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C b/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C
index d4f10c2973f28..208aaeea55de4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C b/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C
index fef1a5342c999..27f7c990a124e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 //  Make sure embedded quotes are not a problem for string and char literals.
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-general.C b/gcc/testsuite/g++.dg/cpp0x/udlit-general.C
index d69db561b4efc..28732d86212e1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-general.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-general.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 // Test user-defined literals.
 // Test simple operator declaration and definition.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C b/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C
index 73298900b4294..a2e4e414319d1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } }
 
 // Test user-defined literals.
 // Test simple operator declaration and definition in namespaces.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C
index c3259ed9b434a..9f57ac5659682 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C
index 7ca37b2a7f975..1991de1150f9d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-resolve-char8_t.C b/gcc/testsuite/g++.dg/cpp0x/udlit-resolve-char8_t.C
index 19cbd519a86fb..5a264c248330a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-resolve-char8_t.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-resolve-char8_t.C
@@ -1,4 +1,5 @@
 // { dg-options "-std=c++17 -fchar8_t" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cstdint>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C b/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
index c1ceef7577fc6..c311cfb8db76c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cstdint>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-sfinae.C b/gcc/testsuite/g++.dg/cpp0x/udlit-sfinae.C
index e24b79d9f0bfc..e69dd5a4255f4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-sfinae.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-sfinae.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C b/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C
index ab65dd08714a6..78e2b26d3bb85 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++11 } }
 // { dg-require-effective-target stdint_types }
+// { dg-skip-if "requires hosted libstdc++ for string in udlit-string-literal.h" { ! hostedlib } }
 // PR c++/55582
 
 #include "udlit-string-literal.h"
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C
index 7283fed9a3569..8f3cc87825a4c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-template.C b/gcc/testsuite/g++.dg/cpp0x/udlit-template.C
index 155831992977e..b5306b9962fd0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-template.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-template.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 // Test user-defined literals.
 // Test template operator declaration and definition.
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C b/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C
index 74e01ec364c9b..dd3b390ca6315 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 // A basic implementation of TR1's bind using variadic teplates
 // Contributed by Douglas Gregor <doug.gregor@gmail.com>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-function.C b/gcc/testsuite/g++.dg/cpp0x/variadic-function.C
index bb98531c3878b..1a5103ae36a2c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-function.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-function.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 // A basic implementation of TR1's function using variadic teplates
 // Contributed by Douglas Gregor <doug.gregor@gmail.com>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C b/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
index aca58e3946150..7a707100613bc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 // A basic implementation of TR1's mem_fn using variadic teplates
 // Contributed by Douglas Gregor <doug.gregor@gmail.com>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C b/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
index 5164598439b3c..651618e3fd1e6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-fexcess-precision=fast" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // An implementation of TR1's <tuple> using variadic teplates
 // Contributed by Douglas Gregor <doug.gregor@gmail.com>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn45.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn45.C
index a9c163dd736c8..203f80762b9bc 100644
--- a/gcc/testsuite/g++.dg/cpp1y/auto-fn45.C
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn45.C
@@ -1,5 +1,6 @@
 // PR c++/69057
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/complex_literals1.C b/gcc/testsuite/g++.dg/cpp1y/complex_literals1.C
index 5ae2370c3ffdf..3cedd0d401fc8 100644
--- a/gcc/testsuite/g++.dg/cpp1y/complex_literals1.C
+++ b/gcc/testsuite/g++.dg/cpp1y/complex_literals1.C
@@ -1,5 +1,6 @@
 // PR c++/79228
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <complex>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/complex_literals1a.C b/gcc/testsuite/g++.dg/cpp1y/complex_literals1a.C
index 9b61f3aa534f5..a5d1e010f8dff 100644
--- a/gcc/testsuite/g++.dg/cpp1y/complex_literals1a.C
+++ b/gcc/testsuite/g++.dg/cpp1y/complex_literals1a.C
@@ -1,6 +1,7 @@
 // PR c++/79228
 // { dg-do compile { target c++14 } }
 // { dg-options "" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <complex>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C
index 3d742cfebd83d..b463c9000812e 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-66093.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-assert1.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-assert1.C
index df2a31539ff00..66acfcc6db0d8 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-assert1.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-assert1.C
@@ -1,5 +1,6 @@
 // PR c++/59329
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-assert2.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-assert2.C
index a3291017324ee..def05f5fb256d 100644
--- a/gcc/testsuite/g++.dg/cpp1y/constexpr-assert2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-assert2.C
@@ -1,5 +1,6 @@
 // PR c++/65985
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69078-2.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69078-2.C
index 318e0967250cf..e73b86e4eb282 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69078-2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69078-2.C
@@ -1,5 +1,6 @@
 // PR c++/69078
 // { dg-do run { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C
index 0926a5e363b81..723512f71f5db 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C
@@ -1,6 +1,7 @@
 // Explicit generic lambda test from N3690 5.1.2.5
 // { dg-do compile { target c++14 } }
 // { dg-options "-Wpedantic" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init8.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init8.C
index 21933bd3e1b1e..7ccb01e3d4f52 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-init8.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init8.C
@@ -1,5 +1,6 @@
 // DR1760: "no additional copy and destruction is performed"
 // { dg-do run { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/new2.C b/gcc/testsuite/g++.dg/cpp1y/new2.C
index cdcbd7daf2b9c..8756ce4cf59fb 100644
--- a/gcc/testsuite/g++.dg/cpp1y/new2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/new2.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -std=c++17 -fdump-tree-cddce-details -fdelete-null-pointer-checks" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 #include <cstdio>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr12.C b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr12.C
index fcc1f50dd810d..92a82fd322b4b 100644
--- a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr12.C
+++ b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr12.C
@@ -1,5 +1,6 @@
 // PR c++/90926
 // { dg-do run { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr57640.C b/gcc/testsuite/g++.dg/cpp1y/pr57640.C
index 0c76a08aecc15..6a79ea239d680 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr57640.C
+++ b/gcc/testsuite/g++.dg/cpp1y/pr57640.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for chrono" { ! hostedlib } }
 
 #include <chrono>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr77786.C b/gcc/testsuite/g++.dg/cpp1y/pr77786.C
index e242228335cb2..c1e2be708404c 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr77786.C
+++ b/gcc/testsuite/g++.dg/cpp1y/pr77786.C
@@ -1,5 +1,6 @@
 // PR c++/77786
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr95226.C b/gcc/testsuite/g++.dg/cpp1y/pr95226.C
index 614c83c8cdabe..0808bd6a2312f 100644
--- a/gcc/testsuite/g++.dg/cpp1y/pr95226.C
+++ b/gcc/testsuite/g++.dg/cpp1y/pr95226.C
@@ -1,5 +1,6 @@
 // PR c++/95226
 // { dg-do run { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-sfinae.C b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-sfinae.C
index b523858e9c093..f1cd1cc8b46df 100644
--- a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-sfinae.C
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-sfinae.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++14 } }
 // { dg-options -w }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C
index c5a67c96cf6b4..babef5a25ecd6 100644
--- a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++14 } }
 // { dg-options -w }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C b/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C
index cad4a1dfc6642..c75e0169beab5 100644
--- a/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for complex in complex_literals.h" { ! hostedlib } }
 
 #include "complex_literals.h"
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction14.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction14.C
index ba2ba9bd1ec16..69bcd8f670eaf 100644
--- a/gcc/testsuite/g++.dg/cpp1z/class-deduction14.C
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction14.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp37.C b/gcc/testsuite/g++.dg/cpp1z/decomp37.C
index 6bf81769b7ef5..6e0e8b561c9fc 100644
--- a/gcc/testsuite/g++.dg/cpp1z/decomp37.C
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp37.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <memory>
 #include <tuple>
diff --git a/gcc/testsuite/g++.dg/cpp1z/eval-order2.C b/gcc/testsuite/g++.dg/cpp1z/eval-order2.C
index af26cb20744e1..1be2af75ef594 100644
--- a/gcc/testsuite/g++.dg/cpp1z/eval-order2.C
+++ b/gcc/testsuite/g++.dg/cpp1z/eval-order2.C
@@ -1,5 +1,6 @@
 // P0145R2: Refining Expression Order for C++
 // { dg-do run { target c++17 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #define assert(X) if (!(X)) __builtin_abort();
diff --git a/gcc/testsuite/g++.dg/cpp1z/fold1.C b/gcc/testsuite/g++.dg/cpp1z/fold1.C
index 6d004676707d4..ee5f4840143cf 100644
--- a/gcc/testsuite/g++.dg/cpp1z/fold1.C
+++ b/gcc/testsuite/g++.dg/cpp1z/fold1.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++17 } }
 // { dg-options "" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/init-statement6.C b/gcc/testsuite/g++.dg/cpp1z/init-statement6.C
index e1848aa5e4abf..95a4bea085bde 100644
--- a/gcc/testsuite/g++.dg/cpp1z/init-statement6.C
+++ b/gcc/testsuite/g++.dg/cpp1z/init-statement6.C
@@ -1,5 +1,6 @@
 // Testcase from P0305R1
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <map>
diff --git a/gcc/testsuite/g++.dg/cpp1z/launder3.C b/gcc/testsuite/g++.dg/cpp1z/launder3.C
index 2a2afc5cad1e4..9095400358934 100644
--- a/gcc/testsuite/g++.dg/cpp1z/launder3.C
+++ b/gcc/testsuite/g++.dg/cpp1z/launder3.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/launder4.C b/gcc/testsuite/g++.dg/cpp1z/launder4.C
index 3a65eb27f2e86..d9698f8c18219 100644
--- a/gcc/testsuite/g++.dg/cpp1z/launder4.C
+++ b/gcc/testsuite/g++.dg/cpp1z/launder4.C
@@ -1,5 +1,6 @@
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/launder5.C b/gcc/testsuite/g++.dg/cpp1z/launder5.C
index 483d6f2929775..5bc97f63aff94 100644
--- a/gcc/testsuite/g++.dg/cpp1z/launder5.C
+++ b/gcc/testsuite/g++.dg/cpp1z/launder5.C
@@ -1,6 +1,7 @@
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-O2" }
 // { dg-additional-sources "launder5.cc" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include "launder5.h"
diff --git a/gcc/testsuite/g++.dg/cpp1z/launder6.C b/gcc/testsuite/g++.dg/cpp1z/launder6.C
index babc4b433ad78..e92b02cd5e2ae 100644
--- a/gcc/testsuite/g++.dg/cpp1z/launder6.C
+++ b/gcc/testsuite/g++.dg/cpp1z/launder6.C
@@ -1,6 +1,7 @@
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-O2" }
 // { dg-additional-sources "launder6.cc" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 #include "launder6.h"
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/utf8.C b/gcc/testsuite/g++.dg/cpp1z/utf8.C
index ed413f30976c1..1d496a10370d4 100644
--- a/gcc/testsuite/g++.dg/cpp1z/utf8.C
+++ b/gcc/testsuite/g++.dg/cpp1z/utf8.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <experimental/type_traits>
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript5.C b/gcc/testsuite/g++.dg/cpp23/subscript5.C
index b36bc774ec4d1..eac6a2457280f 100644
--- a/gcc/testsuite/g++.dg/cpp23/subscript5.C
+++ b/gcc/testsuite/g++.dg/cpp23/subscript5.C
@@ -1,5 +1,6 @@
 // P2128R6
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <initializer_list>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp23/subscript6.C b/gcc/testsuite/g++.dg/cpp23/subscript6.C
index 72c7aef42af17..df4a6f92166c2 100644
--- a/gcc/testsuite/g++.dg/cpp23/subscript6.C
+++ b/gcc/testsuite/g++.dg/cpp23/subscript6.C
@@ -1,6 +1,7 @@
 // P2128R6
 // { dg-do run }
 // { dg-options "-std=c++23" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <initializer_list>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C b/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C
index d13100b96f9cc..7864935cfc0a0 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } }
 
 #include <cmath>
 
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C
index 2fe479934a8bc..e48d640a16796 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C
index 471eaba773fc4..94cebb9cd2a45 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C
index a15749a88be1c..3cb525ec25cef 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C
index 77e10c6b5c72d..865ca3743112a 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C
index 5ee5c2dac8f34..50e98fb831b20 100644
--- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C
+++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++20 } }
 // { dg-additional-options "-fconcepts-ts" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <type_traits>
 #include <utility>
diff --git a/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C b/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C
index 531ec1c4c725f..835276b281503 100644
--- a/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C
+++ b/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C
@@ -1,5 +1,6 @@
 // PR c++/67348
 // { dg-do compile { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <type_traits>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C b/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C
index 4fafac1379311..4a816dacd0fb4 100644
--- a/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } }
 
 #include <cmath>
 
diff --git a/gcc/testsuite/g++.dg/diagnostic/disable.C b/gcc/testsuite/g++.dg/diagnostic/disable.C
index 7d86e073b26c9..c055c40bd4997 100644
--- a/gcc/testsuite/g++.dg/diagnostic/disable.C
+++ b/gcc/testsuite/g++.dg/diagnostic/disable.C
@@ -1,4 +1,5 @@
 // { dg-options "-Wtemplates -Wmultiple-inheritance -Wvirtual-inheritance -Wnamespaces" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 #include <algorithm>
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr65923.C b/gcc/testsuite/g++.dg/diagnostic/pr65923.C
index 036f447818133..85ac03e00c956 100644
--- a/gcc/testsuite/g++.dg/diagnostic/pr65923.C
+++ b/gcc/testsuite/g++.dg/diagnostic/pr65923.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++14 } }
+// { dg-skip-if "requires hosted libstdc++ for chrono" { ! hostedlib } }
 
 #include <chrono>
 
diff --git a/gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C b/gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C
index 8ea25e57ca251..b72df103462a4 100644
--- a/gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C
+++ b/gcc/testsuite/g++.dg/eh/arm-vfp-unwind.C
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-require-effective-target arm32 } */
+/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 /* Test to catch off-by-one errors in arm/pr-support.c.  */
 
diff --git a/gcc/testsuite/g++.dg/eh/crossjump1.C b/gcc/testsuite/g++.dg/eh/crossjump1.C
index ccb0ffb218556..dca2adbff5240 100644
--- a/gcc/testsuite/g++.dg/eh/crossjump1.C
+++ b/gcc/testsuite/g++.dg/eh/crossjump1.C
@@ -3,6 +3,7 @@
 // and one without REG_EH_REGION note.
 // { dg-do run }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <exception>
 #include <string>
diff --git a/gcc/testsuite/g++.dg/eh/filter2.C b/gcc/testsuite/g++.dg/eh/filter2.C
index fe87cc9a30817..e8f96cfd4e60c 100644
--- a/gcc/testsuite/g++.dg/eh/filter2.C
+++ b/gcc/testsuite/g++.dg/eh/filter2.C
@@ -2,6 +2,7 @@
 // running destructors.  Original bug depended on a::~a being inlined.
 // { dg-do run }
 // { dg-options -O }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <exception>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/eh/omit-frame-pointer.C b/gcc/testsuite/g++.dg/eh/omit-frame-pointer.C
index 3792e11fe4c90..f563410ae05c1 100644
--- a/gcc/testsuite/g++.dg/eh/omit-frame-pointer.C
+++ b/gcc/testsuite/g++.dg/eh/omit-frame-pointer.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options -fomit-frame-pointer }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.dg/eh/simd-3.C b/gcc/testsuite/g++.dg/eh/simd-3.C
index 5ac75c932203d..8af385ce14b93 100644
--- a/gcc/testsuite/g++.dg/eh/simd-3.C
+++ b/gcc/testsuite/g++.dg/eh/simd-3.C
@@ -1,6 +1,7 @@
 // { dg-options "-O" }
 // { dg-options "-O -maltivec" { target { powerpc*-*-darwin* && powerpc_altivec_ok } } }
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstdlib>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/eh/uncaught1.C b/gcc/testsuite/g++.dg/eh/uncaught1.C
index 4f05be59fd1a2..9a414b5732aac 100644
--- a/gcc/testsuite/g++.dg/eh/uncaught1.C
+++ b/gcc/testsuite/g++.dg/eh/uncaught1.C
@@ -2,6 +2,7 @@
 // { dg-do run }
 // { dg-options "-Wno-deprecated" }
 // { dg-options "-fuse-cxa-get-exception-ptr -Wno-deprecated" { target powerpc*-*-darwin* } }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <exception>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/eh/uncaught2.C b/gcc/testsuite/g++.dg/eh/uncaught2.C
index 62e4d4ded225b..42fd664d91cf6 100644
--- a/gcc/testsuite/g++.dg/eh/uncaught2.C
+++ b/gcc/testsuite/g++.dg/eh/uncaught2.C
@@ -1,6 +1,7 @@
 // { dg-do compile }
 // { dg-final { scan-assembler-not "__cxa_get_exception" } }
 // { dg-options "-fno-use-cxa-get-exception-ptr -Wno-deprecated" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <exception>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/ext/bases.C b/gcc/testsuite/g++.dg/ext/bases.C
index 43f71925dcd62..9de34c76c1e97 100644
--- a/gcc/testsuite/g++.dg/ext/bases.C
+++ b/gcc/testsuite/g++.dg/ext/bases.C
@@ -1,5 +1,6 @@
 // { dg-options "-w" }
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include<typeinfo>
 #include<cassert>
diff --git a/gcc/testsuite/g++.dg/ext/builtin-line1.C b/gcc/testsuite/g++.dg/ext/builtin-line1.C
index 21a4f59a46f33..4fd6e0c01449d 100644
--- a/gcc/testsuite/g++.dg/ext/builtin-line1.C
+++ b/gcc/testsuite/g++.dg/ext/builtin-line1.C
@@ -1,5 +1,6 @@
 // __builtin_LINE gets the location where the default argument is expanded.
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 struct Foo
diff --git a/gcc/testsuite/g++.dg/ext/complex4.C b/gcc/testsuite/g++.dg/ext/complex4.C
index 78b9356702e3c..b53e289decf75 100644
--- a/gcc/testsuite/g++.dg/ext/complex4.C
+++ b/gcc/testsuite/g++.dg/ext/complex4.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 // This code used to be rejected as there was no conversion from int to float __complex__
  #include <vector>
  typedef float __complex__ fcomplex;
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_assign.C b/gcc/testsuite/g++.dg/ext/has_nothrow_assign.C
index 36b93d8118348..c7d0d3a5bd034 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_assign.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_assign.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C b/gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C
index 594d3a98672da..59715ae87f2ad 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_assign_odr.C
@@ -1,5 +1,6 @@
 // PR c++/36870
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_constructor.C b/gcc/testsuite/g++.dg/ext/has_nothrow_constructor.C
index 03304452f8c2d..a167877e64196 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_constructor.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_constructor.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_constructor_odr.C b/gcc/testsuite/g++.dg/ext/has_nothrow_constructor_odr.C
index 68ca111b09da1..04cad04b29188 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_constructor_odr.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_constructor_odr.C
@@ -1,5 +1,6 @@
 // PR c++/36870
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct S { S (); };
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C
index 04f681f602a1f..f4100817fce10 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C
index 901d2110748f7..45f99e4fe4acb 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C
@@ -1,5 +1,6 @@
 // PR c++/36871
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C
index 7970044109378..fb652e6e99ec7 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C
@@ -1,5 +1,6 @@
 // PR c++/36871
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct F {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C
index 63e67331ec808..ca198ed5ea692 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-4.C
@@ -1,5 +1,6 @@
 // PR c++/36872
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C
index e92801d61bfd1..58d63662720c9 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C
@@ -1,5 +1,6 @@
 // PR c++/36872
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C
index c4e0a5ce7ba5f..88255dc788859 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
index 076f8a31ff645..ee23aaaae4929 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C
index 573fd2f80c853..bf1ea0addaf84 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C
@@ -1,5 +1,6 @@
 // PR c++/36870
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct S { S (const S&); };
diff --git a/gcc/testsuite/g++.dg/ext/has_trivial_assign.C b/gcc/testsuite/g++.dg/ext/has_trivial_assign.C
index dce0f8b3a5162..6a6a718a20465 100644
--- a/gcc/testsuite/g++.dg/ext/has_trivial_assign.C
+++ b/gcc/testsuite/g++.dg/ext/has_trivial_assign.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_trivial_constructor.C b/gcc/testsuite/g++.dg/ext/has_trivial_constructor.C
index f4addd82446fc..021d2d72e1f26 100644
--- a/gcc/testsuite/g++.dg/ext/has_trivial_constructor.C
+++ b/gcc/testsuite/g++.dg/ext/has_trivial_constructor.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_trivial_copy.C b/gcc/testsuite/g++.dg/ext/has_trivial_copy.C
index 4d2341b17e1d0..dd879f708f50e 100644
--- a/gcc/testsuite/g++.dg/ext/has_trivial_copy.C
+++ b/gcc/testsuite/g++.dg/ext/has_trivial_copy.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_trivial_destructor-1.C b/gcc/testsuite/g++.dg/ext/has_trivial_destructor-1.C
index 2834c238d6e97..4ae89e43e3825 100644
--- a/gcc/testsuite/g++.dg/ext/has_trivial_destructor-1.C
+++ b/gcc/testsuite/g++.dg/ext/has_trivial_destructor-1.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/has_virtual_destructor.C b/gcc/testsuite/g++.dg/ext/has_virtual_destructor.C
index 62b60aebf59e9..5f3615e92673f 100644
--- a/gcc/testsuite/g++.dg/ext/has_virtual_destructor.C
+++ b/gcc/testsuite/g++.dg/ext/has_virtual_destructor.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 #include <exception>
 
diff --git a/gcc/testsuite/g++.dg/ext/is_abstract.C b/gcc/testsuite/g++.dg/ext/is_abstract.C
index 2d7149452ffe1..6bda8c2d1b114 100644
--- a/gcc/testsuite/g++.dg/ext/is_abstract.C
+++ b/gcc/testsuite/g++.dg/ext/is_abstract.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/is_aggregate.C b/gcc/testsuite/g++.dg/ext/is_aggregate.C
index bdcc70fa7c228..75172d414f5d5 100644
--- a/gcc/testsuite/g++.dg/ext/is_aggregate.C
+++ b/gcc/testsuite/g++.dg/ext/is_aggregate.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 template<typename T>
diff --git a/gcc/testsuite/g++.dg/ext/is_base_of.C b/gcc/testsuite/g++.dg/ext/is_base_of.C
index 8afa532e1cddb..7204717e23840 100644
--- a/gcc/testsuite/g++.dg/ext/is_base_of.C
+++ b/gcc/testsuite/g++.dg/ext/is_base_of.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 class A1
diff --git a/gcc/testsuite/g++.dg/ext/is_class.C b/gcc/testsuite/g++.dg/ext/is_class.C
index 6f39828558099..f06f53e3ca88c 100644
--- a/gcc/testsuite/g++.dg/ext/is_class.C
+++ b/gcc/testsuite/g++.dg/ext/is_class.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/is_convertible2.C b/gcc/testsuite/g++.dg/ext/is_convertible2.C
index 9b46e2643793e..3dd90bdafb908 100644
--- a/gcc/testsuite/g++.dg/ext/is_convertible2.C
+++ b/gcc/testsuite/g++.dg/ext/is_convertible2.C
@@ -1,5 +1,6 @@
 // PR c++/106784
 // { dg-do compile { target c++20 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // Adapted from <https://en.cppreference.com/w/cpp/types/is_convertible>.
 
 #include <string>
diff --git a/gcc/testsuite/g++.dg/ext/is_empty.C b/gcc/testsuite/g++.dg/ext/is_empty.C
index 4c58941b3bf3f..03c7dc0919e48 100644
--- a/gcc/testsuite/g++.dg/ext/is_empty.C
+++ b/gcc/testsuite/g++.dg/ext/is_empty.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/is_enum.C b/gcc/testsuite/g++.dg/ext/is_enum.C
index 4ac1723ed9a1d..337c00ef14554 100644
--- a/gcc/testsuite/g++.dg/ext/is_enum.C
+++ b/gcc/testsuite/g++.dg/ext/is_enum.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/is_pod.C b/gcc/testsuite/g++.dg/ext/is_pod.C
index d073889c839f7..39035859c205b 100644
--- a/gcc/testsuite/g++.dg/ext/is_pod.C
+++ b/gcc/testsuite/g++.dg/ext/is_pod.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/is_polymorphic.C b/gcc/testsuite/g++.dg/ext/is_polymorphic.C
index 462e4b705d8f2..54adaf411ab22 100644
--- a/gcc/testsuite/g++.dg/ext/is_polymorphic.C
+++ b/gcc/testsuite/g++.dg/ext/is_polymorphic.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 #include <exception>
 
diff --git a/gcc/testsuite/g++.dg/ext/is_union.C b/gcc/testsuite/g++.dg/ext/is_union.C
index c95f5a6e56143..b2ac487227447 100644
--- a/gcc/testsuite/g++.dg/ext/is_union.C
+++ b/gcc/testsuite/g++.dg/ext/is_union.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type10.C b/gcc/testsuite/g++.dg/ext/underlying_type10.C
index 66ba02e997e24..c6e8d6d0b3618 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type10.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type10.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type4.C b/gcc/testsuite/g++.dg/ext/underlying_type4.C
index b80ed57694ba9..f85d35c969713 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type4.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type4.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for tr1/type_traits" { ! hostedlib } }
 
 #include <tr1/type_traits>
 
diff --git a/gcc/testsuite/g++.dg/inherit/virtual8.C b/gcc/testsuite/g++.dg/inherit/virtual8.C
index 4f6a119b2879e..def4eb920f680 100644
--- a/gcc/testsuite/g++.dg/inherit/virtual8.C
+++ b/gcc/testsuite/g++.dg/inherit/virtual8.C
@@ -1,5 +1,6 @@
 // PR c++/48035
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <new>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/init/array4.C b/gcc/testsuite/g++.dg/init/array4.C
index 4712e9d7253dd..61ef9c0d33fa9 100644
--- a/gcc/testsuite/g++.dg/init/array4.C
+++ b/gcc/testsuite/g++.dg/init/array4.C
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-require-effective-target size20plus }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // Origin: Markus Breuer <markus.breuer@materna.de>
 
 // PR c++/6944
diff --git a/gcc/testsuite/g++.dg/init/new18.C b/gcc/testsuite/g++.dg/init/new18.C
index afe3da9b53e64..0542b28dd4562 100644
--- a/gcc/testsuite/g++.dg/init/new18.C
+++ b/gcc/testsuite/g++.dg/init/new18.C
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "-O2 -fstrict-aliasing -Wno-return-type" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // This caused an ICE during placement new.
 
diff --git a/gcc/testsuite/g++.dg/init/new39.C b/gcc/testsuite/g++.dg/init/new39.C
index 430701db68436..14f4d17c6a329 100644
--- a/gcc/testsuite/g++.dg/init/new39.C
+++ b/gcc/testsuite/g++.dg/init/new39.C
@@ -1,5 +1,6 @@
 // Testcase for overflow handling in operator new[].
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 #include <stdlib.h>
 #include <stdexcept>
diff --git a/gcc/testsuite/g++.dg/init/new40.C b/gcc/testsuite/g++.dg/init/new40.C
index 30d9de62a0293..8d90533b0795c 100644
--- a/gcc/testsuite/g++.dg/init/new40.C
+++ b/gcc/testsuite/g++.dg/init/new40.C
@@ -4,6 +4,7 @@
 // { dg-options -std=c++03 }
 // { dg-do run }
 // { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 #include <assert.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-29.C b/gcc/testsuite/g++.dg/ipa/devirt-29.C
index b4f24a1044ca7..ef1ce7bfbdd5f 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-29.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-29.C
@@ -1,4 +1,5 @@
 /* { dg-do run { target c++11 } } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 /* There is a devirtualizable call. In PR60306 we deduced wrong target to cxa_pure_virtual.
    For gcc 4.10 we temporarily disable the devirtualization.  */
 /* { dg-options "-O3"  } */
diff --git a/gcc/testsuite/g++.dg/ipa/pr85549.C b/gcc/testsuite/g++.dg/ipa/pr85549.C
index ae0336e16b715..eeaeb6af6eaff 100644
--- a/gcc/testsuite/g++.dg/ipa/pr85549.C
+++ b/gcc/testsuite/g++.dg/ipa/pr85549.C
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C b/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
index ee567edde6034..0e3259451eaec 100644
--- a/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
+++ b/gcc/testsuite/g++.dg/lookup/missing-std-include-3.C
@@ -3,6 +3,7 @@
    For this case, expect to insert the #include at the top of the file. */
 
 /* { dg-options "-fdiagnostics-generate-patch" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 void test ()
 {
diff --git a/gcc/testsuite/g++.dg/lookup/pr21802.C b/gcc/testsuite/g++.dg/lookup/pr21802.C
index 18b2219166a46..40620bf695ef3 100644
--- a/gcc/testsuite/g++.dg/lookup/pr21802.C
+++ b/gcc/testsuite/g++.dg/lookup/pr21802.C
@@ -1,5 +1,6 @@
 // PR c++/21802
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 
 struct X;
diff --git a/gcc/testsuite/g++.dg/lto/20091022-2_0.C b/gcc/testsuite/g++.dg/lto/20091022-2_0.C
index 29ed9b6b0a064..a1606bc3b6273 100644
--- a/gcc/testsuite/g++.dg/lto/20091022-2_0.C
+++ b/gcc/testsuite/g++.dg/lto/20091022-2_0.C
@@ -1,5 +1,6 @@
 // { dg-lto-do link }
 // { dg-lto-options {{-O3 -flto -Winline}} }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/lto/20091219_0.C b/gcc/testsuite/g++.dg/lto/20091219_0.C
index b76a95a9d1324..eede1c1d9a6f9 100644
--- a/gcc/testsuite/g++.dg/lto/20091219_0.C
+++ b/gcc/testsuite/g++.dg/lto/20091219_0.C
@@ -1,5 +1,6 @@
 // { dg-lto-do run }
 // { dg-lto-options {{-O3 -flto}} }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <map>
diff --git a/gcc/testsuite/g++.dg/lto/pr89358_0.C b/gcc/testsuite/g++.dg/lto/pr89358_0.C
index 328c60c2fb18e..ed14b9da7aaf0 100644
--- a/gcc/testsuite/g++.dg/lto/pr89358_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr89358_0.C
@@ -1,5 +1,6 @@
 /* { dg-lto-do link } */
 /* { dg-lto-options "-std=c++17"  } */
+/* { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } } */
 #include <map>
 
 extern void test();
diff --git a/gcc/testsuite/g++.dg/lto/pr89358_1.C b/gcc/testsuite/g++.dg/lto/pr89358_1.C
index 68b80a3766238..9085b2641d60c 100644
--- a/gcc/testsuite/g++.dg/lto/pr89358_1.C
+++ b/gcc/testsuite/g++.dg/lto/pr89358_1.C
@@ -1,4 +1,5 @@
 /* { dg-options "-std=c++14"  } */
+
 #include <map>
 
 void test()
diff --git a/gcc/testsuite/g++.dg/modules/binding-1_a.H b/gcc/testsuite/g++.dg/modules/binding-1_a.H
index 2d2460d903925..ba9fed733ab93 100644
--- a/gcc/testsuite/g++.dg/modules/binding-1_a.H
+++ b/gcc/testsuite/g++.dg/modules/binding-1_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
 // { dg-module-cmi {} }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.dg/modules/binding-1_b.H b/gcc/testsuite/g++.dg/modules/binding-1_b.H
index eb5140bc02458..09b7adfa83ca1 100644
--- a/gcc/testsuite/g++.dg/modules/binding-1_b.H
+++ b/gcc/testsuite/g++.dg/modules/binding-1_b.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
 // { dg-module-cmi {} }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
diff --git a/gcc/testsuite/g++.dg/modules/contracts-1_a.C b/gcc/testsuite/g++.dg/modules/contracts-1_a.C
index f991ef8644eb3..4bbfaf4237cb9 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-1_a.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-1_a.C
@@ -1,6 +1,7 @@
 // Basic test to ensure that guarded templates correctly serialize and
 // deserialize their contracts through the CMI.
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 #include <experimental/contract>
diff --git a/gcc/testsuite/g++.dg/modules/contracts-1_b.C b/gcc/testsuite/g++.dg/modules/contracts-1_b.C
index 30c15f6928b54..5a890ea6f92a4 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-1_b.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-1_b.C
@@ -1,5 +1,6 @@
 // { dg-module-do run }
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 export module bar;
diff --git a/gcc/testsuite/g++.dg/modules/contracts-2_a.C b/gcc/testsuite/g++.dg/modules/contracts-2_a.C
index 828d680d2a091..d80b438b7a985 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-2_a.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-2_a.C
@@ -4,6 +4,7 @@
 // contracts are correctly marked as a dependency of the function itself and
 // serialized in the correct order.
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-role=default:maybe,maybe,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 #include <experimental/contract>
diff --git a/gcc/testsuite/g++.dg/modules/contracts-2_b.C b/gcc/testsuite/g++.dg/modules/contracts-2_b.C
index 01939aeb947bb..c436f9bf87e9b 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-2_b.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-2_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-role=default:maybe,maybe,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 module foo;
diff --git a/gcc/testsuite/g++.dg/modules/contracts-3_a.C b/gcc/testsuite/g++.dg/modules/contracts-3_a.C
index a4f03d358426c..92f59996b9405 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-3_a.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-3_a.C
@@ -1,6 +1,7 @@
 // Basic test to ensure that guarded templates correctly serialize and
 // deserialize their contracts through the CMI.
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 #include <experimental/contract>
diff --git a/gcc/testsuite/g++.dg/modules/contracts-3_b.C b/gcc/testsuite/g++.dg/modules/contracts-3_b.C
index b1d6375391b6b..e5a75d396aa72 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-3_b.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-3_b.C
@@ -1,5 +1,6 @@
 // { dg-module-do run }
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-role=default:ignore,ignore,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 export module bar;
diff --git a/gcc/testsuite/g++.dg/modules/contracts-4_a.C b/gcc/testsuite/g++.dg/modules/contracts-4_a.C
index f269e6c207826..357bad83d3d95 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-4_a.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-4_a.C
@@ -2,6 +2,7 @@
 // contracts flag is not set, regardless of the current TU's contract
 // configuration.
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-role=default:maybe,maybe,ignore" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 #include <experimental/contract>
diff --git a/gcc/testsuite/g++.dg/modules/contracts-4_d.C b/gcc/testsuite/g++.dg/modules/contracts-4_d.C
index dc56251d1d889..d6858c2271dcd 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-4_d.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-4_d.C
@@ -1,5 +1,6 @@
 // { dg-module-do run }
 // { dg-additional-options "-fmodules-ts -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 export module baz;
diff --git a/gcc/testsuite/g++.dg/modules/global-3_a.C b/gcc/testsuite/g++.dg/modules/global-3_a.C
index fe7bb849ae88c..70d92ea01ca10 100644
--- a/gcc/testsuite/g++.dg/modules/global-3_a.C
+++ b/gcc/testsuite/g++.dg/modules/global-3_a.C
@@ -1,5 +1,6 @@
 // { dg-module-do run }
 // { dg-additional-options "-fmodules-ts -fdump-lang-module-graph" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 module;
 #include <iostream>
 export module logger;
diff --git a/gcc/testsuite/g++.dg/modules/hello-1_a.C b/gcc/testsuite/g++.dg/modules/hello-1_a.C
index 75853d6c8ca45..ce13fd9238eb0 100644
--- a/gcc/testsuite/g++.dg/modules/hello-1_a.C
+++ b/gcc/testsuite/g++.dg/modules/hello-1_a.C
@@ -1,5 +1,6 @@
 // { dg-module-do run }
 // { dg-additional-options -fmodules-ts }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 module;
 #include <iostream>
diff --git a/gcc/testsuite/g++.dg/modules/iostream-1_a.H b/gcc/testsuite/g++.dg/modules/iostream-1_a.H
index 00f8c192bd840..d8c323cde6315 100644
--- a/gcc/testsuite/g++.dg/modules/iostream-1_a.H
+++ b/gcc/testsuite/g++.dg/modules/iostream-1_a.H
@@ -1,6 +1,7 @@
 // { dg-module-do run }
 // { dg-additional-options "-fmodule-header" }
 // { dg-module-cmi {} }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #ifndef MY_IOSTREAM_H
 #define MY_IOSTREAM_H
diff --git a/gcc/testsuite/g++.dg/modules/part-5_c.C b/gcc/testsuite/g++.dg/modules/part-5_c.C
index 0f148c3fce34c..cdcea49e020e6 100644
--- a/gcc/testsuite/g++.dg/modules/part-5_c.C
+++ b/gcc/testsuite/g++.dg/modules/part-5_c.C
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodules-ts }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 import module1;
diff --git a/gcc/testsuite/g++.dg/modules/string-1_a.H b/gcc/testsuite/g++.dg/modules/string-1_a.H
index 77c565f7ddf66..250dcbad0c392 100644
--- a/gcc/testsuite/g++.dg/modules/string-1_a.H
+++ b/gcc/testsuite/g++.dg/modules/string-1_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include <string>
diff --git a/gcc/testsuite/g++.dg/modules/string-1_b.C b/gcc/testsuite/g++.dg/modules/string-1_b.C
index 098289c54f18e..d066b11f9163a 100644
--- a/gcc/testsuite/g++.dg/modules/string-1_b.C
+++ b/gcc/testsuite/g++.dg/modules/string-1_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 import "string-1_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/string-view1.C b/gcc/testsuite/g++.dg/modules/string-view1.C
index f5391f3918050..19219a1e266d3 100644
--- a/gcc/testsuite/g++.dg/modules/string-view1.C
+++ b/gcc/testsuite/g++.dg/modules/string-view1.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 module;
 #include <cstdio>
 #include <string_view>
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H
index f30dacce0cc48..940c6da9576a7 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-1_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for cassert in xtreme-header-1.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header-1.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-1_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-1_b.C
index e2730163ffc26..b64f5944b3c05 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-1_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-1_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for cassert in xtreme-header-1.h" { ! hostedlib } }
 
 #include "xtreme-header-1.h"
 import "xtreme-header-1_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H
index 217ead37d2542..a52fefdae0ab7 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for execution in xtreme-header-2.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header-2.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-2_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-2_b.C
index 1f608ec29b79d..b7ff864ac132b 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-2_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-2_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for execution in xtreme-header-2.h" { ! hostedlib } }
 
 #include "xtreme-header-2.h"
 import "xtreme-header-2_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H
index d3ff6fd4b56c3..695fb279b4a05 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-3_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for deque in xtreme-header-3.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header-3.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-3_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-3_b.C
index 2eb3145c944ff..5a912b8fba141 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-3_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-3_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for deque in xtreme-header-3.h" { ! hostedlib } }
 
 #include "xtreme-header-3.h"
 import "xtreme-header-3_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H
index 391adbe8ebfb1..eb1815c253b50 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-4_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for charconv in xtreme-header-4.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header-4.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-4_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-4_b.C
index ff7147ebf640c..663b3bada3d06 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-4_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-4_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for charconv in xtreme-header-4.h" { ! hostedlib } }
 
 #include "xtreme-header-4.h"
 import "xtreme-header-4_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H
index a03c0241c9e64..371995493b22c 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-5_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for any in xtreme-header-5.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header-5.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C
index 8cf7d6856b937..e6fe2d98d7fd5 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-5_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for any in xtreme-header-5.h" { ! hostedlib } }
 
 #include "xtreme-header-5.h"
 import "xtreme-header-5_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-6_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-6_a.H
index aec5a031fc695..e5b9f2ecf6c74 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-6_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-6_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for barrier in xtreme-header-6.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header-6.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-6_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-6_b.C
index 0d2cc69df54af..f69c56184a74e 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-6_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-6_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for barrier in xtreme-header-6.h" { ! hostedlib } }
 
 #include "xtreme-header-6.h"
 import "xtreme-header-6_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header_a.H
index bf7859fba9912..9c42b7a38ced0 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for any in xtreme-header.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-header.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header_b.C
index 2e736da36dcc1..2b0e91af52a30 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for any in xtreme-header.h" { ! hostedlib } }
 
 #include "xtreme-header.h"
 import "xtreme-header_a.H";
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H b/gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H
index bed70a683bb10..02a2a7e9a7978 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-tr1_a.H
@@ -1,4 +1,5 @@
 // { dg-additional-options -fmodule-header }
+// { dg-skip-if "requires hosted libstdc++ for tr1/functional in xtreme-tr1.h" { ! hostedlib } }
 
 // { dg-module-cmi {} }
 #include "xtreme-tr1.h"
diff --git a/gcc/testsuite/g++.dg/modules/xtreme-tr1_b.C b/gcc/testsuite/g++.dg/modules/xtreme-tr1_b.C
index 9bb1dc294adf5..f0c5990219387 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-tr1_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-tr1_b.C
@@ -1,4 +1,5 @@
 // { dg-additional-options "-fmodules-ts -fno-module-lazy" }
+// { dg-skip-if "requires hosted libstdc++ for tr1/functional in xtreme-tr1.h" { ! hostedlib } }
 
 #include "xtreme-tr1.h"
 import "xtreme-tr1_a.H";
diff --git a/gcc/testsuite/g++.dg/opt/dtor4-aux.cc b/gcc/testsuite/g++.dg/opt/dtor4-aux.cc
index e3ca43b74306d..057ba0fa91a1a 100644
--- a/gcc/testsuite/g++.dg/opt/dtor4-aux.cc
+++ b/gcc/testsuite/g++.dg/opt/dtor4-aux.cc
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "" }
+// { dg-skip-if "requires hosted libstdc++ for cassert in dtor4.h" { ! hostedlib } }
 
 #include "dtor4.h"
 
diff --git a/gcc/testsuite/g++.dg/opt/dtor4.C b/gcc/testsuite/g++.dg/opt/dtor4.C
index c58fadfa18d26..41f1a20824071 100644
--- a/gcc/testsuite/g++.dg/opt/dtor4.C
+++ b/gcc/testsuite/g++.dg/opt/dtor4.C
@@ -2,6 +2,7 @@
 // { dg-do run }
 // { dg-options "-O1 -fipa-sra" }
 // { dg-additional-sources "dtor4-aux.cc" }
+// { dg-skip-if "requires hosted libstdc++ for cassert in dtor4.h" { ! hostedlib } }
 
 #include "dtor4.h"
 
diff --git a/gcc/testsuite/g++.dg/opt/eh4.C b/gcc/testsuite/g++.dg/opt/eh4.C
index 0a62ee2db2722..be30fcc1ffd3f 100644
--- a/gcc/testsuite/g++.dg/opt/eh4.C
+++ b/gcc/testsuite/g++.dg/opt/eh4.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-O3" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Make sure that the call to terminate within F2 is not eliminated
 // by incorrect MUST_NOT_THROW optimization.  Note that we expect F1
diff --git a/gcc/testsuite/g++.dg/opt/nrv17.C b/gcc/testsuite/g++.dg/opt/nrv17.C
index 6248bca037af4..27004e06a68a7 100644
--- a/gcc/testsuite/g++.dg/opt/nrv17.C
+++ b/gcc/testsuite/g++.dg/opt/nrv17.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <cstdlib>
 #include <complex>
diff --git a/gcc/testsuite/g++.dg/opt/pr102970.C b/gcc/testsuite/g++.dg/opt/pr102970.C
index 2acb3c2c8dcbd..84f6fffcad041 100644
--- a/gcc/testsuite/g++.dg/opt/pr102970.C
+++ b/gcc/testsuite/g++.dg/opt/pr102970.C
@@ -1,6 +1,7 @@
 // { dg-do run }
 // { dg-require-effective-target c++14 }
 // { dg-options "-O2 -funroll-loops -fno-tree-vectorize" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 #include <algorithm>
diff --git a/gcc/testsuite/g++.dg/opt/pr109434.C b/gcc/testsuite/g++.dg/opt/pr109434.C
index cffa327fd9b54..9486d1506ddb6 100644
--- a/gcc/testsuite/g++.dg/opt/pr109434.C
+++ b/gcc/testsuite/g++.dg/opt/pr109434.C
@@ -1,6 +1,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++17 }
 // { dg-options "-O2 -Wall" }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 #include <optional>
 #include <stdexcept>
diff --git a/gcc/testsuite/g++.dg/opt/pr15551.C b/gcc/testsuite/g++.dg/opt/pr15551.C
index dc3ddc44662cd..ccaa233ea1ed1 100644
--- a/gcc/testsuite/g++.dg/opt/pr15551.C
+++ b/gcc/testsuite/g++.dg/opt/pr15551.C
@@ -4,6 +4,7 @@
 //
 // { dg-do run }
 // { dg-options "-O3" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 #include <fstream>
diff --git a/gcc/testsuite/g++.dg/opt/pr30965.C b/gcc/testsuite/g++.dg/opt/pr30965.C
index 4adca8b2f6228..49c97e9c2ea5d 100644
--- a/gcc/testsuite/g++.dg/opt/pr30965.C
+++ b/gcc/testsuite/g++.dg/opt/pr30965.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O3 -fno-ipa-icf -fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for tr1/functional" { ! hostedlib } }
 
 #include <tr1/functional>
 #include <algorithm>
diff --git a/gcc/testsuite/g++.dg/opt/pr77844.C b/gcc/testsuite/g++.dg/opt/pr77844.C
index 66eb978ddb75a..3a8252adb9cdb 100644
--- a/gcc/testsuite/g++.dg/opt/pr77844.C
+++ b/gcc/testsuite/g++.dg/opt/pr77844.C
@@ -1,6 +1,7 @@
 // PR debug/77844
 // { dg-do compile }
 // { dg-options "-O3 -g" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/opt/pr85393.C b/gcc/testsuite/g++.dg/opt/pr85393.C
index a2a3162300eaf..4f3c65bdd5c28 100644
--- a/gcc/testsuite/g++.dg/opt/pr85393.C
+++ b/gcc/testsuite/g++.dg/opt/pr85393.C
@@ -2,6 +2,7 @@
 // { dg-do run { target c++11 } }
 // { dg-options "-O2" }
 // { dg-additional-sources "pr85393-aux.cc" }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 #include <stdexcept>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/opt/reload3.C b/gcc/testsuite/g++.dg/opt/reload3.C
index daa7ffdbcefb4..385771154a864 100644
--- a/gcc/testsuite/g++.dg/opt/reload3.C
+++ b/gcc/testsuite/g++.dg/opt/reload3.C
@@ -1,6 +1,7 @@
 // PR target/38287
 // { dg-do run }
 // { dg-options "-O2 -mcpu=v8 -fPIC" { target { { sparc*-*-* } && { ilp32 && fpic } } } }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <cstdlib>
 
diff --git a/gcc/testsuite/g++.dg/other/final7.C b/gcc/testsuite/g++.dg/other/final7.C
index 43ab7baae97e7..5c499a667fd1c 100644
--- a/gcc/testsuite/g++.dg/other/final7.C
+++ b/gcc/testsuite/g++.dg/other/final7.C
@@ -1,5 +1,6 @@
 // PR c++/90909
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 
diff --git a/gcc/testsuite/g++.dg/other/pr40561.C b/gcc/testsuite/g++.dg/other/pr40561.C
index c94dfa4bd6252..09cb2b38fbf1b 100644
--- a/gcc/testsuite/g++.dg/other/pr40561.C
+++ b/gcc/testsuite/g++.dg/other/pr40561.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for set" { ! hostedlib } }
 
 #include <set>
 
diff --git a/gcc/testsuite/g++.dg/other/ucnid-1-utf8.C b/gcc/testsuite/g++.dg/other/ucnid-1-utf8.C
index dab415235951f..77a448596f765 100644
--- a/gcc/testsuite/g++.dg/other/ucnid-1-utf8.C
+++ b/gcc/testsuite/g++.dg/other/ucnid-1-utf8.C
@@ -2,6 +2,7 @@
 /* { dg-options "" } */
 /* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 /* { dg-skip-if "" { ! ucn } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 #include <cstdlib>
 
 int À(void) { return 1; }
diff --git a/gcc/testsuite/g++.dg/other/ucnid-1.C b/gcc/testsuite/g++.dg/other/ucnid-1.C
index 954f34dff9613..ac7cfabf9ef7b 100644
--- a/gcc/testsuite/g++.dg/other/ucnid-1.C
+++ b/gcc/testsuite/g++.dg/other/ucnid-1.C
@@ -2,6 +2,7 @@
 /* { dg-options "" } */
 /* { dg-xfail-if "" { powerpc-ibm-aix* } } */
 /* { dg-skip-if "" { ! ucn } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 #include <cstdlib>
 
 int \u00C0(void) { return 1; }
diff --git a/gcc/testsuite/g++.dg/parse/lookup1.C b/gcc/testsuite/g++.dg/parse/lookup1.C
index 0325d3c692658..fa0e2007f32cd 100644
--- a/gcc/testsuite/g++.dg/parse/lookup1.C
+++ b/gcc/testsuite/g++.dg/parse/lookup1.C
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 #include <list>
 
 using namespace std;
diff --git a/gcc/testsuite/g++.dg/parse/parse5.C b/gcc/testsuite/g++.dg/parse/parse5.C
index f9e6a03598470..e2c924f58b5fd 100644
--- a/gcc/testsuite/g++.dg/parse/parse5.C
+++ b/gcc/testsuite/g++.dg/parse/parse5.C
@@ -1,5 +1,6 @@
 /* PR c++/590 */
 /* { dg-do compile } */
+/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 #include <sstream>
diff --git a/gcc/testsuite/g++.dg/pch/system-1.C b/gcc/testsuite/g++.dg/pch/system-1.C
index 72bea3c9a6f1c..769c5d1171633 100644
--- a/gcc/testsuite/g++.dg/pch/system-1.C
+++ b/gcc/testsuite/g++.dg/pch/system-1.C
@@ -1,3 +1,5 @@
+// { dg-skip-if "requires hosted libstdc++ for iostream in system-1.H" { ! hostedlib } }
+
 #include "system-1.H"
 
 int main() 
diff --git a/gcc/testsuite/g++.dg/pch/system-2.C b/gcc/testsuite/g++.dg/pch/system-2.C
index 44f3ec018aeae..91693cfdbaccc 100644
--- a/gcc/testsuite/g++.dg/pch/system-2.C
+++ b/gcc/testsuite/g++.dg/pch/system-2.C
@@ -1,3 +1,5 @@
+// { dg-skip-if "requires hosted libstdc++ for iostream in system-2.H" { ! hostedlib } }
+
 #include "system-2.H"
 
 int main() 
diff --git a/gcc/testsuite/g++.dg/pr100253.C b/gcc/testsuite/g++.dg/pr100253.C
index 0102caa7df863..96526eb00e3b4 100644
--- a/gcc/testsuite/g++.dg/pr100253.C
+++ b/gcc/testsuite/g++.dg/pr100253.C
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -fno-tree-bit-ccp -ftree-slp-vectorize" } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/pr104547.C b/gcc/testsuite/g++.dg/pr104547.C
index b6135ffe3a04c..669f0b8e43c09 100644
--- a/gcc/testsuite/g++.dg/pr104547.C
+++ b/gcc/testsuite/g++.dg/pr104547.C
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "-O3 -fdump-tree-vrp2"  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/pr107087.C b/gcc/testsuite/g++.dg/pr107087.C
index 3ca76b4153cd1..93428a71ae61b 100644
--- a/gcc/testsuite/g++.dg/pr107087.C
+++ b/gcc/testsuite/g++.dg/pr107087.C
@@ -1,6 +1,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++11 }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/pr71488.C b/gcc/testsuite/g++.dg/pr71488.C
index ffe30f1afeb1a..2ca1a7004465c 100644
--- a/gcc/testsuite/g++.dg/pr71488.C
+++ b/gcc/testsuite/g++.dg/pr71488.C
@@ -3,6 +3,7 @@
 // { dg-options "-O3 -std=c++11" }
 // { dg-additional-options "-msse4" { target sse4_runtime } }
 // { dg-require-effective-target c++11 }
+// { dg-skip-if "requires hosted libstdc++ for valarray" { ! hostedlib } }
 
 #include <valarray>
 
diff --git a/gcc/testsuite/g++.dg/pr71655.C b/gcc/testsuite/g++.dg/pr71655.C
index 45943060bc53c..0269297ed57ef 100644
--- a/gcc/testsuite/g++.dg/pr71655.C
+++ b/gcc/testsuite/g++.dg/pr71655.C
@@ -2,6 +2,7 @@
 // { dg-do compile }
 // { dg-options "-O3 -std=c++11" }
 // { dg-additional-options "-msse4" { target i?86-*-* x86_64-*-* } }
+// { dg-skip-if "requires hosted libstdc++ for valarray" { ! hostedlib } }
 
 #include <functional>
 #include <valarray>
diff --git a/gcc/testsuite/g++.dg/pr79095-3.C b/gcc/testsuite/g++.dg/pr79095-3.C
index 28c8a3768e61d..37eee30dc97ef 100644
--- a/gcc/testsuite/g++.dg/pr79095-3.C
+++ b/gcc/testsuite/g++.dg/pr79095-3.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-Wall -O3" } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/pr83239.C b/gcc/testsuite/g++.dg/pr83239.C
index bf6be7a03cce8..92af1b957c119 100644
--- a/gcc/testsuite/g++.dg/pr83239.C
+++ b/gcc/testsuite/g++.dg/pr83239.C
@@ -2,6 +2,7 @@
 // on simple std::vector code
 // { dg-do compile }
 // { dg-options "-O3 -finline-limit=500 -Wall -fdump-tree-optimized"  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/pr99966.C b/gcc/testsuite/g++.dg/pr99966.C
index 4d689822b87a2..6a772342d0f0e 100644
--- a/gcc/testsuite/g++.dg/pr99966.C
+++ b/gcc/testsuite/g++.dg/pr99966.C
@@ -1,6 +1,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++17 }
 // { dg-options "-O2 -fdump-tree-vrp1" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 // Test we can remove a range bound after the assert.
 
diff --git a/gcc/testsuite/g++.dg/rtti/typeid4.C b/gcc/testsuite/g++.dg/rtti/typeid4.C
index e6a1dce16f0e9..fc84dab697a6d 100644
--- a/gcc/testsuite/g++.dg/rtti/typeid4.C
+++ b/gcc/testsuite/g++.dg/rtti/typeid4.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <typeinfo>
 #include <iostream>
diff --git a/gcc/testsuite/g++.dg/spellcheck-inttypes.C b/gcc/testsuite/g++.dg/spellcheck-inttypes.C
index 541d668cbba42..781dcb259f417 100644
--- a/gcc/testsuite/g++.dg/spellcheck-inttypes.C
+++ b/gcc/testsuite/g++.dg/spellcheck-inttypes.C
@@ -1,4 +1,5 @@
 /* { dg-options "-std=c++11" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 #ifdef _AIX
 #define _STD_TYPES_T
 #endif
diff --git a/gcc/testsuite/g++.dg/template/friend10.C b/gcc/testsuite/g++.dg/template/friend10.C
index cab5e346f0bf3..49e753184701e 100644
--- a/gcc/testsuite/g++.dg/template/friend10.C
+++ b/gcc/testsuite/g++.dg/template/friend10.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 // Copyright (C) 2002 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 24 Dec 2002 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.dg/template/pr69961a.C b/gcc/testsuite/g++.dg/template/pr69961a.C
index b0c5d41b27c34..1cd69b90130cb 100644
--- a/gcc/testsuite/g++.dg/template/pr69961a.C
+++ b/gcc/testsuite/g++.dg/template/pr69961a.C
@@ -1,5 +1,6 @@
 // PR c++/69961
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/template/show-template-tree-3.C b/gcc/testsuite/g++.dg/template/show-template-tree-3.C
index ef3113711aee5..1b39dfca12f22 100644
--- a/gcc/testsuite/g++.dg/template/show-template-tree-3.C
+++ b/gcc/testsuite/g++.dg/template/show-template-tree-3.C
@@ -9,6 +9,7 @@
    for that in this case).  */
 
 // { dg-options "-fdiagnostics-show-template-tree -Wno-return-type" }
+// { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } }
 
 #include <map>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/torture/alias-1.C b/gcc/testsuite/g++.dg/torture/alias-1.C
index 2abe543851092..01eb86ca2a4c9 100644
--- a/gcc/testsuite/g++.dg/torture/alias-1.C
+++ b/gcc/testsuite/g++.dg/torture/alias-1.C
@@ -3,6 +3,7 @@
 // from inlined destructor, the buf1 variable doesn't go out of scope
 // until after the baz call.
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <new>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/torture/builtin-location.C b/gcc/testsuite/g++.dg/torture/builtin-location.C
index cad53de4b485c..6dd94b25deeb1 100644
--- a/gcc/testsuite/g++.dg/torture/builtin-location.C
+++ b/gcc/testsuite/g++.dg/torture/builtin-location.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 
diff --git a/gcc/testsuite/g++.dg/torture/pr103669.C b/gcc/testsuite/g++.dg/torture/pr103669.C
index a9509c354f18f..856f865d5a9e0 100644
--- a/gcc/testsuite/g++.dg/torture/pr103669.C
+++ b/gcc/testsuite/g++.dg/torture/pr103669.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 /* { dg-additional-options "--param=modref-max-depth=1" } */
+/* { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 #include <list>
 
 typedef std::list<void *> PtrList;
diff --git a/gcc/testsuite/g++.dg/torture/pr104601.C b/gcc/testsuite/g++.dg/torture/pr104601.C
index 92ad73d47e92d..65ee8ff8a333f 100644
--- a/gcc/testsuite/g++.dg/torture/pr104601.C
+++ b/gcc/testsuite/g++.dg/torture/pr104601.C
@@ -1,6 +1,7 @@
 // PR tree-optimization/104601
 // { dg-do run }
 // { dg-options "-std=c++17" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <algorithm>
 #include <optional>
diff --git a/gcc/testsuite/g++.dg/torture/pr106922.C b/gcc/testsuite/g++.dg/torture/pr106922.C
index b0c1489fbdc43..102c2bd896ae8 100644
--- a/gcc/testsuite/g++.dg/torture/pr106922.C
+++ b/gcc/testsuite/g++.dg/torture/pr106922.C
@@ -1,6 +1,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++17 }
 // { dg-additional-options "-Wall" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 // -O1 doesn't iterate VN and thus has bogus uninit diagnostics
 // { dg-skip-if "" { *-*-* } { "-O1" } { "" } }
 
diff --git a/gcc/testsuite/g++.dg/torture/pr111019.C b/gcc/testsuite/g++.dg/torture/pr111019.C
index ce21a311c96ef..4903dc308b765 100644
--- a/gcc/testsuite/g++.dg/torture/pr111019.C
+++ b/gcc/testsuite/g++.dg/torture/pr111019.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-fstrict-aliasing" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <memory>
diff --git a/gcc/testsuite/g++.dg/torture/pr33572.C b/gcc/testsuite/g++.dg/torture/pr33572.C
index b4db2ac662ba2..7809c9733a387 100644
--- a/gcc/testsuite/g++.dg/torture/pr33572.C
+++ b/gcc/testsuite/g++.dg/torture/pr33572.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++98" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 #include <memory>
diff --git a/gcc/testsuite/g++.dg/torture/pr33735.C b/gcc/testsuite/g++.dg/torture/pr33735.C
index 0a90745b91e51..30522f99cc237 100644
--- a/gcc/testsuite/g++.dg/torture/pr33735.C
+++ b/gcc/testsuite/g++.dg/torture/pr33735.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 #include <string>
 typedef struct _ts { } PyThreadState;
 PyThreadState * Py_NewInterpreter(void);
diff --git a/gcc/testsuite/g++.dg/torture/pr34099.C b/gcc/testsuite/g++.dg/torture/pr34099.C
index 49fa9cac1ebc1..eceacab37b361 100644
--- a/gcc/testsuite/g++.dg/torture/pr34099.C
+++ b/gcc/testsuite/g++.dg/torture/pr34099.C
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <complex>
 
diff --git a/gcc/testsuite/g++.dg/torture/pr39417.C b/gcc/testsuite/g++.dg/torture/pr39417.C
index b7bbb88b78456..84d497a1c218c 100644
--- a/gcc/testsuite/g++.dg/torture/pr39417.C
+++ b/gcc/testsuite/g++.dg/torture/pr39417.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/torture/pr44972.C b/gcc/testsuite/g++.dg/torture/pr44972.C
index e409148da1c32..b51fc5e0e1767 100644
--- a/gcc/testsuite/g++.dg/torture/pr44972.C
+++ b/gcc/testsuite/g++.dg/torture/pr44972.C
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include<cassert>
 #include<new>
diff --git a/gcc/testsuite/g++.dg/torture/pr46364.C b/gcc/testsuite/g++.dg/torture/pr46364.C
index 40fd2f0760f20..d822278df57a5 100644
--- a/gcc/testsuite/g++.dg/torture/pr46364.C
+++ b/gcc/testsuite/g++.dg/torture/pr46364.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 #include <string>
 
 void a()
diff --git a/gcc/testsuite/g++.dg/torture/pr49628.C b/gcc/testsuite/g++.dg/torture/pr49628.C
index 4bc6543a35e32..197c8c1cccc8f 100644
--- a/gcc/testsuite/g++.dg/torture/pr49628.C
+++ b/gcc/testsuite/g++.dg/torture/pr49628.C
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/torture/pr49938.C b/gcc/testsuite/g++.dg/torture/pr49938.C
index d2c73e73871a3..fbb74e7b559a7 100644
--- a/gcc/testsuite/g++.dg/torture/pr49938.C
+++ b/gcc/testsuite/g++.dg/torture/pr49938.C
@@ -1,3 +1,4 @@
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 #include <cstdlib>
 typedef unsigned short uint16;
diff --git a/gcc/testsuite/g++.dg/torture/pr51903.C b/gcc/testsuite/g++.dg/torture/pr51903.C
index 925021b7e4ba7..36cc52e46fbc6 100644
--- a/gcc/testsuite/g++.dg/torture/pr51903.C
+++ b/gcc/testsuite/g++.dg/torture/pr51903.C
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "-O2 -fnon-call-exceptions -fno-guess-branch-probability" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/torture/pr54498.C b/gcc/testsuite/g++.dg/torture/pr54498.C
index 74651f9063a89..5d1e275dfcb4a 100644
--- a/gcc/testsuite/g++.dg/torture/pr54498.C
+++ b/gcc/testsuite/g++.dg/torture/pr54498.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-additional-options "-fno-tree-sra" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <complex>
 
diff --git a/gcc/testsuite/g++.dg/torture/pr60750.C b/gcc/testsuite/g++.dg/torture/pr60750.C
index a344bd764a336..c53189a28fd65 100644
--- a/gcc/testsuite/g++.dg/torture/pr60750.C
+++ b/gcc/testsuite/g++.dg/torture/pr60750.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 // { dg-options "-std=c++11" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <stdexcept>
diff --git a/gcc/testsuite/g++.dg/torture/pr67600.C b/gcc/testsuite/g++.dg/torture/pr67600.C
index 0206cae186c48..375654cd4e0f5 100644
--- a/gcc/testsuite/g++.dg/torture/pr67600.C
+++ b/gcc/testsuite/g++.dg/torture/pr67600.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 #include <sstream>
diff --git a/gcc/testsuite/g++.dg/torture/pr82084.C b/gcc/testsuite/g++.dg/torture/pr82084.C
index 416684d2cb854..1fbb4f01cfe24 100644
--- a/gcc/testsuite/g++.dg/torture/pr82084.C
+++ b/gcc/testsuite/g++.dg/torture/pr82084.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 int main()
diff --git a/gcc/testsuite/g++.dg/torture/pr95493-1.C b/gcc/testsuite/g++.dg/torture/pr95493-1.C
index 907d191ebfeb9..57765dd8d8a64 100644
--- a/gcc/testsuite/g++.dg/torture/pr95493-1.C
+++ b/gcc/testsuite/g++.dg/torture/pr95493-1.C
@@ -1,4 +1,5 @@
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // PR rtl-optimization/95493 comment 8
 
 #include <array>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/allocator-opt1.C b/gcc/testsuite/g++.dg/tree-ssa/allocator-opt1.C
index 51c470dee372f..37b228eff9b64 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/allocator-opt1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/allocator-opt1.C
@@ -1,5 +1,6 @@
 // PR c++/105838
 // { dg-additional-options -fdump-tree-gimple }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 // Check that there's only one allocator (temporary) variable.
 // Currently the dump doesn't print the allocator template arg in this context.
diff --git a/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C b/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C
index dca7868f3c96c..8dddbea38a12f 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-cddce2 -ffinite-loops -Wno-unused-result" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C
index b1d2d25faf4c0..89abdd90a82ae 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C
@@ -1,6 +1,7 @@
 // PR c++/105838
 // { dg-additional-options -fdump-tree-gimple }
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 // Test that we do range-initialization from const char *.
 // { dg-final { scan-tree-dump {_M_range_initialize<const char\* const\*>} "gimple" } }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C
index 1e9ac739b2d79..8080e9fbfbd62 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C
@@ -1,6 +1,7 @@
 // PR c++/105838
 // { dg-additional-options -fdump-tree-gimple }
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 // Test that we do range-initialization from const char *.
 // { dg-final { scan-tree-dump {_M_range_initialize<const char\* const\*>} "gimple" } }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C
index c750b99eeca3b..65ce086bfd5bb 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C
@@ -1,5 +1,6 @@
 // PR c++/108266
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <initializer_list>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C b/gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C
index 0d679cb9035a6..5d30d694bb86d 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O3 -fdump-tree-lsplit-details" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <map>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr101839.C b/gcc/testsuite/g++.dg/tree-ssa/pr101839.C
index bb7b61cad436d..3a81c8d636448 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr101839.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr101839.C
@@ -1,6 +1,7 @@
 // { dg-do run }                                                            
 // { dg-options "-O2 -fdump-tree-optimized" }                                   
 // { dg-require-effective-target c++11 }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <string.h>
 #include <iostream>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr104529.C b/gcc/testsuite/g++.dg/tree-ssa/pr104529.C
index 3cb3853c22a17..f7dd30ca3117f 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr104529.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr104529.C
@@ -2,6 +2,7 @@
 // { dg-do compile { target c++11 } }
 // { dg-options "-O2 -fdump-tree-optimized" }
 // { dg-final { scan-tree-dump-not "MEM\[^\n\r]*MEM" "optimized" } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <cstddef>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr14703.C b/gcc/testsuite/g++.dg/tree-ssa/pr14703.C
index cf821a58aed7e..669bb4d9f1987 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr14703.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr14703.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized -fno-ipa-reference" } */
+/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 
 namespace {
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19786.C b/gcc/testsuite/g++.dg/tree-ssa/pr19786.C
index faaecdfd97174..2c37753f6030b 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr19786.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19786.C
@@ -1,5 +1,6 @@
 // { dg-do run }
 /* { dg-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // We used to get alias grouping wrong on this one, hoisting accesses
 // to the vector's end out of the loop.
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr46228.C b/gcc/testsuite/g++.dg/tree-ssa/pr46228.C
index 1178eb7038e70..c4dab1aa7108e 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr46228.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr46228.C
@@ -1,4 +1,5 @@
 // { dg-options "-fdump-tree-optimized -Os" }
+// { dg-skip-if "requires hosted libstdc++ for set" { ! hostedlib } }
 #include <set>
 #include <stdio.h>
 
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr63841.C b/gcc/testsuite/g++.dg/tree-ssa/pr63841.C
index 2a2c78f9fb25e..a96c6c83b0e1b 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr63841.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr63841.C
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr69336.C b/gcc/testsuite/g++.dg/tree-ssa/pr69336.C
index c946176bfdaed..39d58e0da7bbc 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr69336.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr69336.C
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "-O3 -fdump-tree-optimized -std=c++14" }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 #include <array>
 #include <utility>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr78847.C b/gcc/testsuite/g++.dg/tree-ssa/pr78847.C
index e72e516d8d4b9..fd08192e98d1c 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr78847.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr78847.C
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target c++14 } */
 /* { dg-options "-O3 -fdump-tree-ldist-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <stddef.h>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr95638.C b/gcc/testsuite/g++.dg/tree-ssa/pr95638.C
index d1bea6dffaa95..0dcc3fdd93296 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr95638.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr95638.C
@@ -1,6 +1,7 @@
 // PR tree-optimization/95638
 // { dg-do run }
 // { dg-options "-O2 -std=c++14" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <cstdio>
diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-27.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-27.C
index 06ce089c4b0e0..269999a1f912f 100644
--- a/gcc/testsuite/g++.dg/warn/Warray-bounds-27.C
+++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-27.C
@@ -2,6 +2,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++11 }
 // { dg-options "-O2 -Warray-bounds" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <array>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-pointer-pr110055.C b/gcc/testsuite/g++.dg/warn/Wdangling-pointer-pr110055.C
index 77dbbf380b691..b2df01e7d5110 100644
--- a/gcc/testsuite/g++.dg/warn/Wdangling-pointer-pr110055.C
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-pointer-pr110055.C
@@ -1,6 +1,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++11 }
 // { dg-options "-O3 -fno-exceptions -Wdangling-pointer" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <cstdint>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-reference10.C b/gcc/testsuite/g++.dg/warn/Wdangling-reference10.C
index 733fb8cce6305..cc92e6b66e3d2 100644
--- a/gcc/testsuite/g++.dg/warn/Wdangling-reference10.C
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-reference10.C
@@ -1,6 +1,7 @@
 // PR c++/107532
 // { dg-do compile { target c++20 } }
 // { dg-options "-Wdangling-reference" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <span>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-reference4.C b/gcc/testsuite/g++.dg/warn/Wdangling-reference4.C
index aee7a29019b9a..0343bcf226b62 100644
--- a/gcc/testsuite/g++.dg/warn/Wdangling-reference4.C
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-reference4.C
@@ -1,5 +1,6 @@
 // { dg-do compile { target c++17 } }
 // { dg-options "-Wdangling-reference" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // Check that we warn here even without -Wsystem-headers.
 
 #include <optional>
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-reference5.C b/gcc/testsuite/g++.dg/warn/Wdangling-reference5.C
index 59b5538aee59b..5e9da1e5bf170 100644
--- a/gcc/testsuite/g++.dg/warn/Wdangling-reference5.C
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-reference5.C
@@ -1,6 +1,7 @@
 // PR c++/107488
 // { dg-do compile }
 // { dg-options "-Wdangling-reference" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C b/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C
index 47f97dcb636a9..9d8958599ab31 100644
--- a/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C
+++ b/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C
@@ -2,7 +2,8 @@
    Verify that even without -Wsystem-headers the warning is issued
    for pairs of library functions defined in system headers.
    { dg-do compile { target c++11 } }
-   { dg-options "-O2 -Wall" } */
+   { dg-options "-O2 -Wall" }
+   { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } */
 
 #include <memory>
 #include <string>
diff --git a/gcc/testsuite/g++.dg/warn/Winline-3.C b/gcc/testsuite/g++.dg/warn/Winline-3.C
index 1c226d1b4a04b..0b318a9da6775 100644
--- a/gcc/testsuite/g++.dg/warn/Winline-3.C
+++ b/gcc/testsuite/g++.dg/warn/Winline-3.C
@@ -1,4 +1,5 @@
 // { dg-options "-Winline -O" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wmemset-elt-size1.C b/gcc/testsuite/g++.dg/warn/Wmemset-elt-size1.C
index e4d3232063d36..1eb29e0308866 100644
--- a/gcc/testsuite/g++.dg/warn/Wmemset-elt-size1.C
+++ b/gcc/testsuite/g++.dg/warn/Wmemset-elt-size1.C
@@ -1,5 +1,6 @@
 // PR c++/85710
 // { dg-additional-options -Wmemset-elt-size }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C
index 29414e00e366e..28602822d79c6 100644
--- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wstrict-aliasing" } */
+/* { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 
 #include<list>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape.C
index 9ea619877059f..c01aaf7706290 100644
--- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape.C
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wstrict-aliasing" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 #include <list>
diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-6.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-6.C
index 8173e601d4b26..51238dc6297c2 100644
--- a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-6.C
+++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-6.C
@@ -1,7 +1,8 @@
 /* PR middle-end/97595 - bogus -Wstringop-overflow due to DECL_SIZE_UNIT
    underreporting field size
    { dg-do compile { target c++11 } }
-   { dg-options "-O2 -Wall -Wsystem-headers" } */
+   { dg-options "-O2 -Wall -Wsystem-headers" }
+   { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } */
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C
index d0ef5e73f9374..7666fa388ac13 100644
--- a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C
+++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-8.C
@@ -1,5 +1,6 @@
 // PR c++/103534
 // { dg-additional-options "-O -Wall" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overread-1.C b/gcc/testsuite/g++.dg/warn/Wstringop-overread-1.C
index f7ba61783da94..65874be855d39 100644
--- a/gcc/testsuite/g++.dg/warn/Wstringop-overread-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wstringop-overread-1.C
@@ -1,6 +1,7 @@
 // PR middle-end/98994
 // { dg-do compile }
 // { dg-additional-options "-Wstringop-overread -O2" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/warn/Wuninitialized-33.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-33.C
index 1bb0639ee300f..41232c083c18e 100644
--- a/gcc/testsuite/g++.dg/warn/Wuninitialized-33.C
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-33.C
@@ -2,6 +2,7 @@
 // { dg-do compile }
 // { dg-require-effective-target c++17 }
 // { dg-options "-O2 -Wall" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <algorithm>
 #include <memory>
diff --git a/gcc/testsuite/g++.dg/warn/format1.C b/gcc/testsuite/g++.dg/warn/format1.C
index 27bc414b098ae..fec23e6252535 100644
--- a/gcc/testsuite/g++.dg/warn/format1.C
+++ b/gcc/testsuite/g++.dg/warn/format1.C
@@ -2,6 +2,7 @@
 // Origin: Joseph Myers <jsm28@cam.ac.uk>.
 // { dg-do compile }
 // { dg-options "-ansi -pedantic -Wformat" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 
 #include <cstdio>
 
diff --git a/gcc/testsuite/g++.dg/warn/noreturn-1.C b/gcc/testsuite/g++.dg/warn/noreturn-1.C
index 17375d42eb76e..2a3dbcd97f929 100644
--- a/gcc/testsuite/g++.dg/warn/noreturn-1.C
+++ b/gcc/testsuite/g++.dg/warn/noreturn-1.C
@@ -2,6 +2,7 @@
 // Origin: Kaveh Ghazi <ghazi@caip.rutgers.edu> 2002-06-18.
 // { dg-do compile }
 // { dg-options "-Wall -O2" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 #include <cstdlib>
 
diff --git a/gcc/testsuite/g++.dg/warn/string1.C b/gcc/testsuite/g++.dg/warn/string1.C
index 9eb5fb696be54..c162bdf486605 100644
--- a/gcc/testsuite/g++.dg/warn/string1.C
+++ b/gcc/testsuite/g++.dg/warn/string1.C
@@ -1,5 +1,6 @@
 // PR c++/35652
 // { dg-options "-O -Wall" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 int test() {
diff --git a/gcc/testsuite/g++.dg/warn/uninit-pr105562.C b/gcc/testsuite/g++.dg/warn/uninit-pr105562.C
index ec3a5503c8043..63a53b46ec0ab 100644
--- a/gcc/testsuite/g++.dg/warn/uninit-pr105562.C
+++ b/gcc/testsuite/g++.dg/warn/uninit-pr105562.C
@@ -1,5 +1,6 @@
 // { dg-require-effective-target c++11 }
 // { dg-options "-O -Wall -fno-strict-aliasing" }
+// { dg-skip-if "requires hosted libstdc++ for regex" { ! hostedlib } }
 
 #include <regex>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C
index d05f48f500164..f9a7ad5b0f054 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // 981203 bkoz
 // g++/15071
 // gcc invocation fails to link in libstdc++
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/copy9.C b/gcc/testsuite/g++.old-deja/g++.brendan/copy9.C
index 79339c13de9d7..1294e6c58701a 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/copy9.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/copy9.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-additional-options "-fexcess-precision=fast" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed copy-ctors
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C
index 3c59fa64b43a7..a6acd0aacf3f5 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed old-abort
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C
index 93dc58cb150ae..116d11827eba6 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash20.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 // GROUPS passed old-abort
 #include <complex>
 typedef std::complex<double> Complex;
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C
index 937cb10293ba8..ee7a1ffff4661 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash30.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // GROUPS passed old-abort
 #include <string>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash38.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash38.C
index 80ef47180a92e..bdcd1108ce137 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash38.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash38.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed old-abort
 /*
    I received the following message when using g++ (version 2.3.3):
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
index 392c0a0091f24..fda212a12be69 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-w" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // GROUPS passed old-abort
 //#include <GetOpt.h>
 #include <stdio.h>
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash49.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash49.C
index e0664da28dd80..0b3978161a6ef 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash49.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash49.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed old-abort
 #include<iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C
index 1318ea6e9fef7..be46b71a9c7cf 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-Wreturn-type" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed old-abort
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash62.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash62.C
index 7147c9a8e6e03..52531e6dc2c34 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash62.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash62.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed old-abort
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C b/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C
index f67602d29d910..a33aa6c7592f9 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed conversions
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C b/gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C
index 724c6f5c320c2..9b1da17e3df57 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/err-msg3.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for fstream" { ! hostedlib } }
 // GROUPS passed error-messages
 #include <fstream>
 #include <iomanip>
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/nest21.C b/gcc/testsuite/g++.old-deja/g++.brendan/nest21.C
index 62ddab15600b6..a43d179ae1b11 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/nest21.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/nest21.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed nested-classes
 #include <iostream>
 #include <cstdio>
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C b/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C
index 669bd7914218a..72e04f1d26b47 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed ptolemy-bugs
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template24.C b/gcc/testsuite/g++.old-deja/g++.jason/template24.C
index 0efce9ff12ec1..09fdc2e644eea 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/template24.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template24.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // Bug: g++ doesn't find the conversion from ostream_withassign to ostream.
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template31.C b/gcc/testsuite/g++.old-deja/g++.jason/template31.C
index 81d696f2f0971..45b0e6e8b7e39 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/template31.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template31.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // PRMS Id: 8569
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C b/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
index ec5156e0cd0bc..9eb3c92f408ce 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <typeinfo>
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg1.C b/gcc/testsuite/g++.old-deja/g++.law/arg1.C
index 2a87633d10a78..ea7191787bed1 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arg1.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arg1.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed arg-matching
 // arg-matching file
 // Subject: argument matching depending on the def order
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg8.C b/gcc/testsuite/g++.old-deja/g++.law/arg8.C
index 1aba05fb2e1ad..6e8a467c945fd 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arg8.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arg8.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed arg-matching
 // arg-matching file
 // Message-Id: <9307081747.AA14030@tnt>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm12.C b/gcc/testsuite/g++.old-deja/g++.law/arm12.C
index 866b47ada4407..7866296aa3068 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm12.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm12.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed ARM-compliance
 // arm file
 // From: belley@cae.ca (Benoit Belley 3218)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm9.C b/gcc/testsuite/g++.old-deja/g++.law/arm9.C
index ab18189dde3ee..c0e5efcacbaf5 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm9.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm9.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed ARM-compliance
 #include        <iostream>
 enum f1 {
diff --git a/gcc/testsuite/g++.old-deja/g++.law/bad-error7.C b/gcc/testsuite/g++.old-deja/g++.law/bad-error7.C
index 4c07d4315249a..dc3bc75696848 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/bad-error7.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/bad-error7.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed bad-errors
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/code-gen5.C b/gcc/testsuite/g++.old-deja/g++.law/code-gen5.C
index 0a992d0b9e891..aadded80a8dfc 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/code-gen5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/code-gen5.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // GROUPS passed code-generation
 // code-gen file
 // From: "David" <norman@pi14.arc.umn.edu>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors10.C b/gcc/testsuite/g++.old-deja/g++.law/ctors10.C
index cbf36cff55f55..d131a8c9ae0c0 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/ctors10.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/ctors10.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed constructors
 // ctor file
 // Message-Id: <9302052351.AA10789@harvey>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors12.C b/gcc/testsuite/g++.old-deja/g++.law/ctors12.C
index adc5128ea7c53..bc5bf77e0b5c7 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/ctors12.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/ctors12.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // GROUPS passed constructors
 #include <cstdio>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors13.C b/gcc/testsuite/g++.old-deja/g++.law/ctors13.C
index 82f70f35f063f..f12972743bbd0 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/ctors13.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/ctors13.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed constructors
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C
index 0d61c49abd791..e91045874e99b 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for fstream" { ! hostedlib } }
 // GROUPS passed constructors
 // ctor file
 // Message-Id: <199306151813.gD28471@mail.Germany.EU.net>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors6.C b/gcc/testsuite/g++.old-deja/g++.law/ctors6.C
index ee26cb5020f54..9c6de0bfe503e 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/ctors6.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/ctors6.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 // GROUPS passed constructors
 #include <complex>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt16.C b/gcc/testsuite/g++.old-deja/g++.law/cvt16.C
index 0c821b5896624..9f88a6e578567 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/cvt16.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/cvt16.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed conversions
 // cvt file
 // Message-Id: <9304121647.AA25819@tnt>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt2.C b/gcc/testsuite/g++.old-deja/g++.law/cvt2.C
index afe138bd96996..77b000e31fcf5 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/cvt2.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/cvt2.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // GROUPS passed conversions
 #include <cstdio>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt7.C b/gcc/testsuite/g++.old-deja/g++.law/cvt7.C
index e68adf02106fb..bf68a0f3d6945 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/cvt7.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/cvt7.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // GROUPS passed conversions
 // cvt file
 // From: krste@icsi.berkeley.edu (Krste Asanovic)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/except5.C b/gcc/testsuite/g++.old-deja/g++.law/except5.C
index a99ad8a4833ed..7a4ad287907e8 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/except5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/except5.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-fexceptions" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed exceptions
 // except file
 // Message-Id: <199311101607.AA11803@hsi86.hsi.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
index 7ae494b75da09..a42cf6aab98e7 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-additional-options -fpermissive }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed missed-error
 // missed-error file
 // From: ndc!don@csvax.cs.caltech.edu (Don Erway)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/nest3.C b/gcc/testsuite/g++.old-deja/g++.law/nest3.C
index daeaa201bd52c..fdac0ece2bebf 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/nest3.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/nest3.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed nest
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators32.C b/gcc/testsuite/g++.old-deja/g++.law/operators32.C
index 991e38ddbc4b5..577c52ca812ce 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/operators32.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/operators32.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed operators
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators4.C b/gcc/testsuite/g++.old-deja/g++.law/operators4.C
index fc623b4fc26b5..dda42aafd0895 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/operators4.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/operators4.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 // GROUPS passed operators
 // opr-del file
 // From: rollins@bart.ee.queensu.ca (Mark Rollins)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/vbase1.C b/gcc/testsuite/g++.old-deja/g++.law/vbase1.C
index 4cfe51d7740f8..077d6b21e96bc 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/vbase1.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/vbase1.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed vbase
 // vbase file
 // From: pino@hubble.eecs.berkeley.edu (Jose Luis Pino)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/virtual3.C b/gcc/testsuite/g++.old-deja/g++.law/virtual3.C
index 46fa08512be6f..a1a105ec81ce4 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/virtual3.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/virtual3.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed virtual-functions
 // virtual file
 // From: allan@ramjet.multinet.DE (Allan Brighton)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility1.C b/gcc/testsuite/g++.old-deja/g++.law/visibility1.C
index 1c786feb9d14c..ab5baf70c795f 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility1.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility1.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility10.C b/gcc/testsuite/g++.old-deja/g++.law/visibility10.C
index 7abb4a85d7c02..4eb5615df7377 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility10.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility10.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
index 451ef1afaf8e2..9644c085fd166 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 // visibility file
 // From: dinh@cs.ucla.edu (Dinh Le)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
index bf7a747c705f6..501855a4ba73a 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility17.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 // visibility file
 // From: Sandeep Shroff <ss@caere.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility2.C b/gcc/testsuite/g++.old-deja/g++.law/visibility2.C
index 539169639c3c4..c926ef518d5cc 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility2.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility2.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility22.C b/gcc/testsuite/g++.old-deja/g++.law/visibility22.C
index e3d9d1f6d002a..2088432494de6 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility22.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility22.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 // visibility file
 // From: Robert Carden <carden@thoth.ics.uci.edu>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility25.C b/gcc/testsuite/g++.old-deja/g++.law/visibility25.C
index 167436d00687d..91931b0769b6e 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility25.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility25.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 // visibility file
 // From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility7.C b/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
index 33358b12b5100..db65523fbc7eb 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility7.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // GROUPS passed visibility
 // visibility file
 // From: Gordon Joly <G.Joly@cs.ucl.ac.uk>
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/new1.C b/gcc/testsuite/g++.old-deja/g++.martin/new1.C
index 18eb88d7c79e8..68a5fd8549160 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/new1.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/new1.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 //Lifetime of temporaries:
 //egcs 2.92 performs cleanup for temporaries inside new expressions
 //after the new is complete, not at the end of the full expression.
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C b/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C
index 33e3fa787b92b..2c6d4590fc1da 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/dyncast7.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-fexceptions" }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 #include <typeinfo>
 #include <stdexcept>
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh13.C b/gcc/testsuite/g++.old-deja/g++.mike/eh13.C
index e2c7435c5ca9b..170d7bc8b1aaa 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh13.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh13.C
@@ -1,5 +1,6 @@
 // { dg-do run { xfail arm-*-pe } }
 // { dg-options "-fexceptions" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh2.C b/gcc/testsuite/g++.old-deja/g++.mike/eh2.C
index 862bd6e759832..1ef7d45807eb0 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh2.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh2.C
@@ -1,5 +1,6 @@
 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
 // { dg-options "-fexceptions" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <cstdlib>
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net34.C b/gcc/testsuite/g++.old-deja/g++.mike/net34.C
index 19a7e16bad20b..cb69cfaa0c825 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net34.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net34.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net46.C b/gcc/testsuite/g++.old-deja/g++.mike/net46.C
index a2362325452d6..b1dcd189b7599 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net46.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net46.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <cstdlib>
 #include <cstddef>
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p658.C b/gcc/testsuite/g++.old-deja/g++.mike/p658.C
index a6268a36fd76b..0f52805478b7b 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p658.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p658.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // prms-id: 658
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/rtti1.C b/gcc/testsuite/g++.old-deja/g++.mike/rtti1.C
index 19aa3894e8cb4..795aab90305a0 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/rtti1.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/rtti1.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <typeinfo>
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/using4.C b/gcc/testsuite/g++.old-deja/g++.ns/using4.C
index 72332f13e7a82..7a3c465781baa 100644
--- a/gcc/testsuite/g++.old-deja/g++.ns/using4.C
+++ b/gcc/testsuite/g++.old-deja/g++.ns/using4.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 //Build don't link
 #include <vector>
 namespace csp {
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/using6.C b/gcc/testsuite/g++.old-deja/g++.ns/using6.C
index 68cf2da115796..bb54b8033907d 100644
--- a/gcc/testsuite/g++.old-deja/g++.ns/using6.C
+++ b/gcc/testsuite/g++.old-deja/g++.ns/using6.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 
 namespace csp {
diff --git a/gcc/testsuite/g++.old-deja/g++.other/defarg6.C b/gcc/testsuite/g++.old-deja/g++.other/defarg6.C
index fabf0198000b1..a2b9fd1502632 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/defarg6.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/defarg6.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 // Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
 
 #include <vector>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/headers1.C b/gcc/testsuite/g++.old-deja/g++.other/headers1.C
index 1080fe38c8ac7..5d37e94082f77 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/headers1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/headers1.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 // Copyright (C) 2000 Free Software Foundation, Inc.
 // Contributed by Loren J. Rittle 07 Jun 2000 <ljrittle@acm.org>
 //
diff --git a/gcc/testsuite/g++.old-deja/g++.other/init9.C b/gcc/testsuite/g++.old-deja/g++.other/init9.C
index 0194cd1b49a94..d38f978975e6a 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/init9.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/init9.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 // Based on a testcase submitted by Tudor Hulubei <tudor@cs.unh.edu>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline14.C b/gcc/testsuite/g++.old-deja/g++.other/inline14.C
index 1bd74b4ac7379..473a8f078724e 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/inline14.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline14.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline2.C b/gcc/testsuite/g++.old-deja/g++.other/inline2.C
index f1d19626685fc..4a9499acd83a9 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/inline2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline2.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-O2 -Winline" }
+// { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } }
 // Origin: Martin Reinecke <martin@MPA-Garching.MPG.DE>
 
 #include <cmath>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline7.C b/gcc/testsuite/g++.old-deja/g++.other/inline7.C
index 626000039c57d..410351f11b43e 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/inline7.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline7.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 // Origin: Mark Mitchell <mark@codesourcery.com>
 
 #include <list>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline8.C b/gcc/testsuite/g++.old-deja/g++.other/inline8.C
index c12a8f74a9015..d45a359c96cad 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/inline8.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline8.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O1" }
+// { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } }
 // Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
 
 #include <map>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/optimize2.C b/gcc/testsuite/g++.old-deja/g++.other/optimize2.C
index b34eae05ebd44..a16394fd4816c 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/optimize2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/optimize2.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // 
 // Copyright (C) 2001 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 26 May 2001 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C b/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C
index fa9e37b378c7e..ecf2e1bbe2fc0 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/sibcall1.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.other/unchanging1.C b/gcc/testsuite/g++.old-deja/g++.other/unchanging1.C
index 6b2999cb95a2f..6beb513bba92f 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/unchanging1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/unchanging1.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 #include <complex>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash68.C b/gcc/testsuite/g++.old-deja/g++.pt/crash68.C
index 9afeae09aaf3e..c5ce84f5bff69 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash68.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash68.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-prune-output "mangled name" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // 
 // Copyright (C) 2001 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 25 Jul 2001 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
index c0495233af81e..e498c3b8396a8 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // Origin: philippeb@videotron.ca
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
index b98e8da6b1e5c..44e7eac730559 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } }
 #include<map>
 #include<iostream>
 #include<vector>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb113.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb113.C
index 9c7ca6bfaed96..a5dbfa4f8e55c 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb113.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb113.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 
 class X : public std::streambuf
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb115.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb115.C
index e7065b269fe67..fe44e06ce2071 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb115.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb115.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 #include <typeinfo>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb124.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb124.C
index 0be035ae867cb..728d9c209fbc8 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb124.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb124.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 #include <stdexcept>
 class X : public std::runtime_error {
   X ();
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C
index d8d28b36a6341..1cd9abbd2daed 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb127.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 // Gets ICE 40.
 
 #include <vector>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C
index a8dae01afe2df..c42f88a79644b 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb129.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 // Gives ICE on EGCS release branch as of 98/06/08 on i686-pc-linux-gnulibc1)
 // From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>    
 // Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C
index 3150422e3c504..51ffcbeedc4bd 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb129a.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 // Gives ICE on EGCS release branch as of 98/06/08 on i686-pc-linux-gnulibc1)
 // From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>    
 // Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb130.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb130.C
index 20175cd9d3fd7..932f24911095f 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb130.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb130.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-Wall -Wno-deprecated" }
+// { dg-skip-if "requires hosted libstdc++ for backward/hash_set" { ! hostedlib } }
 // Gives spurious warnings when compiled with -Wall
 // EGCS 06/08/98 i686-pc-linux-gnulibc1
 // Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
index e5992aa66cbf8..b432b2da6b744 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-O -Wall  -fgcse" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 // From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> 
 // Reported against EGCS snaps 98/06/28.
 //
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb15.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb15.C
index 1cb9fd15c8351..c1d94498c723a 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb15.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb15.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include<iostream>
 #include<cstddef>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C
index a061fc016cf3c..0c615d4974659 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb21.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 
 #include <sstream>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb24.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb24.C
index 5e2a3ee45b3a9..0abbce2ed776f 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb24.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb24.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 
 template < class T >
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C
index 0df2e10ae793a..054e53179c411 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-Wno-deprecated -Wno-return-type" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 /* bug.cc */
 /* simple program to demonstrate the bug with named return values in gcc
 */
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb28.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb28.C
index 89f19d57c996d..7f93d76f54f95 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb28.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb28.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 
 using namespace std;
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb29.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb29.C
index bea0d12e17782..c1880c8571e9b 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb29.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb29.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 
 using namespace std;
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb3.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb3.C
index b7487e97ba5b6..91e7e730a612d 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb3.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb3.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 #include <complex>
 template<class T>
 class Vec {
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb30.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb30.C
index e0f290b7f0be5..b22d482e2bfe6 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb30.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb30.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for fstream" { ! hostedlib } }
 #include <fstream>
 
 class bifstream : public std::ifstream {
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb31.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb31.C
index 1e3c8f02d16de..49c90679da348 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb31.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb31.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include<iostream>
 
 int main() {
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb33.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb33.C
index 50328ad490045..005f9c9bc84bd 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb33.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb33.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for fstream" { ! hostedlib } }
 #include <fstream>
 #include <cstdio>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C
index 56e67b3008201..0c5ebf9a902e4 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb36.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 using namespace std;
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb39.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb39.C
index 144d3fff7ee55..24aa24b037d11 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb39.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb39.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for cctype" { ! hostedlib } }
 #include <cctype>
 #include <iostream>
 #include <sstream>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
index 99c2ca979ad8f..474784133245c 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb4.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // Error: Internal Compiler Error in GCC 2.7.2 and EGCS 1998/05/28 snapshot.
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C
index 9f6ee5f43e0e4..37422fbd6ecd4 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb41.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <iterator>
 #include <string>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
index c54050c3c7aa7..e4d16c7fb7230 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 // All the pointer_to_binary_function cases used to fail because g++
 // couldn't handle converting an overloaded function to a class type.
 // The first one should still fail because it requires an implicit conversion
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C
index b21343c478ac9..ca8fcc372b23b 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb44.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // spurious 'const' in error.
 // For egcs-2.91.34, the warning message refers to
 // class ostream & operator <<(class ostream &, const class Vector<T> &)
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb46.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb46.C
index cbe482e90b806..7102504a1ae16 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb46.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb46.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 
 class A1 {
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb54.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb54.C
index 1e71ca82e6dbc..de8916770a56b 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb54.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb54.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iomanip" { ! hostedlib } }
 #include <iomanip>
 #include <iostream>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb55.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb55.C
index c1e2400ed9a32..2486a0688bb2a 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb55.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb55.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for sstream" { ! hostedlib } }
 // Since the constructor is in streambuf.h, additional diagnostics are
 // produced, which are not really supported in the old-deja framework
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C
index 84ccff26d1631..7fadf9a33a934 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb59.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #define INC_FUNCTIONAL  1
 #define USE_STATIC_CAST 1
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C
index ea80a4ce2e1cb..f81861ecade9a 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 #include <string>
 
 class t {
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C
index bffba04800f09..8f6094a1fb1e5 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb62.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 
 void f(void)
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb66.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb66.C
index 3088593656e19..d9dc0a03548c9 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb66.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb66.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 #include <cassert>
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C
index 4785305ff5308..83fa20db92161 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb7.C
@@ -1,4 +1,5 @@
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 #include <vector>
 
 class T
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb73.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb73.C
index bf9cf598d9c94..6fcad36242212 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb73.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb73.C
@@ -1,5 +1,6 @@
 // { dg-do run  }
 // { dg-options "-O -Wall" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // Depletes VM.
 
 #include <iostream>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C
index 358c186ab9158..553fc539eaff7 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C
@@ -1,4 +1,5 @@
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 #include <iostream>
 #include <sstream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C
index 1c1ad3e306779..9597d2e71fa14 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-prune-output "note" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // Makes bogus x86 assembly code.
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.warn/iomanip.C b/gcc/testsuite/g++.old-deja/g++.warn/iomanip.C
index c437b26dbd114..c31d4cfb75cbd 100644
--- a/gcc/testsuite/g++.old-deja/g++.warn/iomanip.C
+++ b/gcc/testsuite/g++.old-deja/g++.warn/iomanip.C
@@ -1,5 +1,6 @@
 // { dg-do assemble  }
 // { dg-options "-O -Winline" }
+// { dg-skip-if "requires hosted libstdc++ for iomanip" { ! hostedlib } }
 // Bug: g++ wouldn't inline op<< because it was an explicit instantiation.
 // Origin: Jason Merrill <jason@cygnus.com>
 
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 50e8004f13bd0..ddc19185decf5 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -865,6 +865,24 @@ proc check_effective_target_freestanding { } {
     return 0
 }
 
+# Return 1 if a hosted implementation of libstdc++ is available
+# (i.e. not freestanding).  Language must be c++.
+proc check_effective_target_hostedlib { } {
+    if [check_effective_target_freestanding] {
+        return 0
+    }
+    if [check_effective_target_c++] {
+        return [check_no_compiler_messages hostedlib assembly {
+            #include <bits/c++config.h>
+            #if ! _GLIBCXX_HOSTED
+            #error not hosted
+            #endif
+	    int hosted;
+        }]
+    }
+    return 1
+}
+
 # Check to see that file I/O functions are available.
 proc check_effective_target_fileio { } {
     return [check_no_compiler_messages fileio_available executable {

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-02  1:11 testsuite: introduce hostedlib effective target Alexandre Oliva
@ 2023-11-05 20:40 ` Mike Stump
  2023-11-07 10:04   ` Alexandre Oliva
  2023-11-08 16:29   ` Alexandre Oliva
  0 siblings, 2 replies; 11+ messages in thread
From: Mike Stump @ 2023-11-05 20:40 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches, Rainer Orth

On Nov 1, 2023, at 6:11 PM, Alexandre Oliva <oliva@adacore.com> wrote:
> 
> Several C++ tests fail with --disable-hosted-libstdcxx, whether
> because stdc++ext gets linked in despite not being built, because
> standard headers are included but that are unavailable in this mode,
> or because headers are (mistakenly?) expected to introduce
> declarations such as for ::abort, but in this mode they don't.
> 
> This patch introduces an effective target for GCC test, equivalent to
> one that's available in the libstdc++-v3 testsuite, and arranges for
> all such tests to be skipped when libstdc++-v3 is not hosted.
> 
> This patch was tested with arm-eabi, with libstdc++-v3 configured with
> --disable-hosted-libstdcxx, on gcc-13, and with x86_64-linux-gnu
> likewise on trunk.  In the latter, there are a number of additional
> fails that appear to be related, and that I'm yet to investigate, but
> this is big enough already, so I figured I'd post this and see whether
> the approach is regarded as sound and acceptable before proceeding any
> further.  WDYT?  Ok to install, to deal with other targets
> incrementally?

Ick.  I wish there were fewer changed lines and not 1 per test case. It feels like we've painted ourselves into a corner.

That said, I'd rather have a nice solid game plan that is better and suggest it over this approach but, the best I can think of it something that can notice after the fact during an error, and during error processing, trim or expect, which is awfully vague.

So, instead of commenting more, I'd ask if anyone has a nice, good concrete idea and say I want to withdraw from the vague.

If someone comes up with something you think is better, easy, smaller and or other goodness and you want to go that direction, I'd encourage that, otherwise, I'll approve this version.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-05 20:40 ` Mike Stump
@ 2023-11-07 10:04   ` Alexandre Oliva
  2023-11-07 10:18     ` Jonathan Wakely
  2023-11-08 16:29   ` Alexandre Oliva
  1 sibling, 1 reply; 11+ messages in thread
From: Alexandre Oliva @ 2023-11-07 10:04 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches, Rainer Orth, libstdc++

[adding libstdc++@]

On Nov  5, 2023, Mike Stump <mikestump@comcast.net> wrote:

> Ick.

Indeed ;-)

> I wish there were fewer changed lines and not 1 per test
> case. It feels like we've painted ourselves into a corner.

The libstdc++ testsuite took a different approach, detecting missing
headers (and libraries?) at error pruning time, and xfailing the tests,
which seems to be more in line with what you are looking for.

That approach, though more expedient, seems more fragile to me, in that
an actual bug that caused headers to go missing would cause tests to be
silently skipped rather than fail.

I expect the set of headers, and thus of affected tests, won't by very
dynamic, so it's kind of a one-shot change.

Of course new tests might be added that rely on such headers, and would
likely go unnoticed until someone tries them on a non-hosted libstdc++.
We could alleviate this if libstdc++ headers that are not installed on
hosted systems issued a warning (conditional on some macro defined by
the testsuite, say -D_GLIBCXX_WARN_HOSTED_ONLY).  For tests aimed
exclusively at hosted libstdc++, we'd then use a dg directive that both
implied this requirement, and changed the macro definition to suppress
the warning.  Then anyone who added a testcase that included hosted
headers without indicating its hostedlib requirement would get a fail
even when testing with a hosted libstdc++.

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-07 10:04   ` Alexandre Oliva
@ 2023-11-07 10:18     ` Jonathan Wakely
  2023-11-07 10:24       ` Jonathan Wakely
  0 siblings, 1 reply; 11+ messages in thread
From: Jonathan Wakely @ 2023-11-07 10:18 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Mike Stump, gcc-patches, Rainer Orth, libstdc++, Arsen Arsenović

On Tue, 7 Nov 2023 at 10:04, Alexandre Oliva <oliva@adacore.com> wrote:
>
> [adding libstdc++@]
>
> On Nov  5, 2023, Mike Stump <mikestump@comcast.net> wrote:
>
> > Ick.
>
> Indeed ;-)
>
> > I wish there were fewer changed lines and not 1 per test
> > case. It feels like we've painted ourselves into a corner.
>
> The libstdc++ testsuite took a different approach, detecting missing
> headers (and libraries?) at error pruning time, and xfailing the tests,
> which seems to be more in line with what you are looking for.
>
> That approach, though more expedient, seems more fragile to me, in that
> an actual bug that caused headers to go missing would cause tests to be
> silently skipped rather than fail.

I don't think we XFAIL based on missing headers. We XFAIL based on a
specific #error message in certain headers.

If a header goes missing, we'll still XFAIL.

>
> I expect the set of headers, and thus of affected tests, won't by very
> dynamic, so it's kind of a one-shot change.
>
> Of course new tests might be added that rely on such headers, and would
> likely go unnoticed until someone tries them on a non-hosted libstdc++.

Since GCC 13 you don't need to build a non-hosted libstdc++ to test
it, you can just add -ffreestanding to the runtestflags.

> We could alleviate this if libstdc++ headers that are not installed on
> hosted systems issued a warning (conditional on some macro defined by
> the testsuite, say -D_GLIBCXX_WARN_HOSTED_ONLY).

That's exactly what happens (except #error not #warning) when you
compile with -ffreestanding.

>  For tests aimed
> exclusively at hosted libstdc++, we'd then use a dg directive that both
> implied this requirement, and changed the macro definition to suppress
> the warning.  Then anyone who added a testcase that included hosted
> headers without indicating its hostedlib requirement would get a fail
> even when testing with a hosted libstdc++.

I don't think we need to add checks for a new macro and then use that
when testing, you can just test with -ffreestanding instead. This
already works today.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-07 10:18     ` Jonathan Wakely
@ 2023-11-07 10:24       ` Jonathan Wakely
  2023-11-07 10:37         ` Jonathan Wakely
  0 siblings, 1 reply; 11+ messages in thread
From: Jonathan Wakely @ 2023-11-07 10:24 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Mike Stump, gcc-patches, Rainer Orth, libstdc++, Arsen Arsenović

On Tue, 7 Nov 2023 at 10:18, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Tue, 7 Nov 2023 at 10:04, Alexandre Oliva <oliva@adacore.com> wrote:
> >
> > [adding libstdc++@]
> >
> > On Nov  5, 2023, Mike Stump <mikestump@comcast.net> wrote:
> >
> > > Ick.
> >
> > Indeed ;-)
> >
> > > I wish there were fewer changed lines and not 1 per test
> > > case. It feels like we've painted ourselves into a corner.
> >
> > The libstdc++ testsuite took a different approach, detecting missing
> > headers (and libraries?) at error pruning time, and xfailing the tests,
> > which seems to be more in line with what you are looking for.
> >
> > That approach, though more expedient, seems more fragile to me, in that
> > an actual bug that caused headers to go missing would cause tests to be
> > silently skipped rather than fail.
>
> I don't think we XFAIL based on missing headers. We XFAIL based on a
> specific #error message in certain headers.
>
> If a header goes missing, we'll still XFAIL.
>
> >
> > I expect the set of headers, and thus of affected tests, won't by very
> > dynamic, so it's kind of a one-shot change.
> >
> > Of course new tests might be added that rely on such headers, and would
> > likely go unnoticed until someone tries them on a non-hosted libstdc++.
>
> Since GCC 13 you don't need to build a non-hosted libstdc++ to test
> it, you can just add -ffreestanding to the runtestflags.
>
> > We could alleviate this if libstdc++ headers that are not installed on
> > hosted systems issued a warning (conditional on some macro defined by
> > the testsuite, say -D_GLIBCXX_WARN_HOSTED_ONLY).
>
> That's exactly what happens (except #error not #warning) when you
> compile with -ffreestanding.
>
> >  For tests aimed
> > exclusively at hosted libstdc++, we'd then use a dg directive that both
> > implied this requirement, and changed the macro definition to suppress
> > the warning.  Then anyone who added a testcase that included hosted
> > headers without indicating its hostedlib requirement would get a fail
> > even when testing with a hosted libstdc++.
>
> I don't think we need to add checks for a new macro and then use that
> when testing, you can just test with -ffreestanding instead. This
> already works today.

Ah, reading back in the thread for  the context I missed, I see that
you're specifically testing a --disable-hosted-libstdcxx build. In
that case some headers really will be absent, not just
present-with-#error. But I am still not concerned about failing to
notice if a header goes unintentionally missing, because the libstdc++
testsuite will still notice that.

We don't prune based on "no such header" errors, so would still get
FAILs for those tests that depend on headers which are supposed to be
present for freestanding.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-07 10:24       ` Jonathan Wakely
@ 2023-11-07 10:37         ` Jonathan Wakely
  2023-11-08 15:30           ` Alexandre Oliva
  0 siblings, 1 reply; 11+ messages in thread
From: Jonathan Wakely @ 2023-11-07 10:37 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Mike Stump, gcc-patches, Rainer Orth, libstdc++, Arsen Arsenović

On Tue, 7 Nov 2023 at 10:24, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Tue, 7 Nov 2023 at 10:18, Jonathan Wakely <jwakely@redhat.com> wrote:
> >
> > On Tue, 7 Nov 2023 at 10:04, Alexandre Oliva <oliva@adacore.com> wrote:
> > >
> > > [adding libstdc++@]
> > >
> > > On Nov  5, 2023, Mike Stump <mikestump@comcast.net> wrote:
> > >
> > > > Ick.
> > >
> > > Indeed ;-)
> > >
> > > > I wish there were fewer changed lines and not 1 per test
> > > > case. It feels like we've painted ourselves into a corner.
> > >
> > > The libstdc++ testsuite took a different approach, detecting missing
> > > headers (and libraries?) at error pruning time, and xfailing the tests,
> > > which seems to be more in line with what you are looking for.
> > >
> > > That approach, though more expedient, seems more fragile to me, in that
> > > an actual bug that caused headers to go missing would cause tests to be
> > > silently skipped rather than fail.
> >
> > I don't think we XFAIL based on missing headers. We XFAIL based on a
> > specific #error message in certain headers.
> >
> > If a header goes missing, we'll still XFAIL.
> >
> > >
> > > I expect the set of headers, and thus of affected tests, won't by very
> > > dynamic, so it's kind of a one-shot change.
> > >
> > > Of course new tests might be added that rely on such headers, and would
> > > likely go unnoticed until someone tries them on a non-hosted libstdc++.
> >
> > Since GCC 13 you don't need to build a non-hosted libstdc++ to test
> > it, you can just add -ffreestanding to the runtestflags.
> >
> > > We could alleviate this if libstdc++ headers that are not installed on
> > > hosted systems issued a warning (conditional on some macro defined by
> > > the testsuite, say -D_GLIBCXX_WARN_HOSTED_ONLY).
> >
> > That's exactly what happens (except #error not #warning) when you
> > compile with -ffreestanding.
> >
> > >  For tests aimed
> > > exclusively at hosted libstdc++, we'd then use a dg directive that both
> > > implied this requirement, and changed the macro definition to suppress
> > > the warning.  Then anyone who added a testcase that included hosted
> > > headers without indicating its hostedlib requirement would get a fail
> > > even when testing with a hosted libstdc++.
> >
> > I don't think we need to add checks for a new macro and then use that
> > when testing, you can just test with -ffreestanding instead. This
> > already works today.
>
> Ah, reading back in the thread for  the context I missed, I see that
> you're specifically testing a --disable-hosted-libstdcxx build. In
> that case some headers really will be absent, not just
> present-with-#error. But I am still not concerned about failing to
> notice if a header goes unintentionally missing, because the libstdc++
> testsuite will still notice that.
>
> We don't prune based on "no such header" errors, so would still get
> FAILs for those tests that depend on headers which are supposed to be
> present for freestanding.

An alternative approach for the g++ testsuite would be to provide a
set of dummy headers for the non-freestanding ones, so that all the
hosted-only headers are provided by the testsuite itself, but consist
of a single line:

#error not available in freestanding

Then match on that and XFAIL. So the individual tests themselves
wouldn't need the dg-skip-if added to them, they would just
automatically XFAIL if they use a hosted-only header.

The difficulty would be where to add those dummy headers for
<iostream>, <cstdio> etc. so that they're only found when testing a
non-hosted build. Maybe libstdc++ could provide them in the build dir
for the purposes of the testsuite, but not install them?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-07 10:37         ` Jonathan Wakely
@ 2023-11-08 15:30           ` Alexandre Oliva
  2023-11-08 15:48             ` Jonathan Wakely
  0 siblings, 1 reply; 11+ messages in thread
From: Alexandre Oliva @ 2023-11-08 15:30 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Mike Stump, gcc-patches, Rainer Orth, libstdc++, Arsen Arsenović

On Nov  7, 2023, Jonathan Wakely <jwakely@redhat.com> wrote:

> An alternative approach for the g++ testsuite would be to provide a
> set of dummy headers for the non-freestanding ones, so that all the
> hosted-only headers are provided by the testsuite itself, but consist
> of a single line:

> #error not available in freestanding

> Then match on that and XFAIL. So the individual tests themselves
> wouldn't need the dg-skip-if added to them, they would just
> automatically XFAIL if they use a hosted-only header.

*nod*.  That wouldn't cover all the circumstances, alas: there are tests
that fail in freestanding mode not because of headers, but because
-fcontracts (currently?) links libstdc++exp in, and that library is not
even built in freestanding mode.

> The difficulty would be where to add those dummy headers for
> <iostream>, <cstdio> etc. so that they're only found when testing a
> non-hosted build. Maybe libstdc++ could provide them in the build dir
> for the purposes of the testsuite, but not install them?

We run install-tree testing, so that wouldn't quite work for us.  If the
headers are in some subdirectory in the source tree, that we (or the
testsuite machinery) would just add to the -I set, that would help.

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-08 15:30           ` Alexandre Oliva
@ 2023-11-08 15:48             ` Jonathan Wakely
  2023-11-08 15:49               ` Jonathan Wakely
  0 siblings, 1 reply; 11+ messages in thread
From: Jonathan Wakely @ 2023-11-08 15:48 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Mike Stump, gcc-patches, Rainer Orth, libstdc++, Arsen Arsenović

On Wed, 8 Nov 2023 at 15:30, Alexandre Oliva <oliva@adacore.com> wrote:
>
> On Nov  7, 2023, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> > An alternative approach for the g++ testsuite would be to provide a
> > set of dummy headers for the non-freestanding ones, so that all the
> > hosted-only headers are provided by the testsuite itself, but consist
> > of a single line:
>
> > #error not available in freestanding
>
> > Then match on that and XFAIL. So the individual tests themselves
> > wouldn't need the dg-skip-if added to them, they would just
> > automatically XFAIL if they use a hosted-only header.
>
> *nod*.  That wouldn't cover all the circumstances, alas: there are tests
> that fail in freestanding mode not because of headers, but because
> -fcontracts (currently?) links libstdc++exp in, and that library is not
> even built in freestanding mode.

Hmm, yes, that seems like a bug. Either we should provide
libstdc++exp.a for freestanding builds (with a simplified contract
violation handler that doesn't print to stdout), or the front end
should not add -lstdc++exp when -ffreestanding is used (which would
require teh user, or the testsuite in your case, to provide a custom
contract violation handler), or it should be an error to use
-fcontracts and -ffreestanding together.

The libstdc++-v3/src/experimental/contract.cc file *already* supports
freestanding, we just don't actually build it for freestanding. We can
do that.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-08 15:48             ` Jonathan Wakely
@ 2023-11-08 15:49               ` Jonathan Wakely
  0 siblings, 0 replies; 11+ messages in thread
From: Jonathan Wakely @ 2023-11-08 15:49 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Mike Stump, gcc-patches, Rainer Orth, libstdc++, Arsen Arsenović

On Wed, 8 Nov 2023 at 15:48, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Wed, 8 Nov 2023 at 15:30, Alexandre Oliva <oliva@adacore.com> wrote:
> >
> > On Nov  7, 2023, Jonathan Wakely <jwakely@redhat.com> wrote:
> >
> > > An alternative approach for the g++ testsuite would be to provide a
> > > set of dummy headers for the non-freestanding ones, so that all the
> > > hosted-only headers are provided by the testsuite itself, but consist
> > > of a single line:
> >
> > > #error not available in freestanding
> >
> > > Then match on that and XFAIL. So the individual tests themselves
> > > wouldn't need the dg-skip-if added to them, they would just
> > > automatically XFAIL if they use a hosted-only header.
> >
> > *nod*.  That wouldn't cover all the circumstances, alas: there are tests
> > that fail in freestanding mode not because of headers, but because
> > -fcontracts (currently?) links libstdc++exp in, and that library is not
> > even built in freestanding mode.
>
> Hmm, yes, that seems like a bug. Either we should provide
> libstdc++exp.a for freestanding builds (with a simplified contract
> violation handler that doesn't print to stdout), or the front end
> should not add -lstdc++exp when -ffreestanding is used (which would
> require teh user, or the testsuite in your case, to provide a custom
> contract violation handler), or it should be an error to use
> -fcontracts and -ffreestanding together.
>
> The libstdc++-v3/src/experimental/contract.cc file *already* supports
> freestanding, we just don't actually build it for freestanding. We can
> do that.

Which might be as simple as:

--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -34,14 +34,13 @@ backtrace_dir = libbacktrace
else
backtrace_dir =
endif
-
-experimental_dir = experimental
else
filesystem_dir =
backtrace_dir =
-experimental_dir =
endif

+experimental_dir = experimental
+
## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
SUBDIRS = c++98 c++11 c++17 c++20 c++23 \
       $(filesystem_dir) $(backtrace_dir) $(experimental_dir)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-05 20:40 ` Mike Stump
  2023-11-07 10:04   ` Alexandre Oliva
@ 2023-11-08 16:29   ` Alexandre Oliva
  2023-11-09 21:42     ` Mike Stump
  1 sibling, 1 reply; 11+ messages in thread
From: Alexandre Oliva @ 2023-11-08 16:29 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches, Rainer Orth

On Nov  5, 2023, Mike Stump <mikestump@comcast.net> wrote:

> that, otherwise, I'll approve this version.

FWIW, this version is not usable as is.  Something went wrong in my
testing, and several regressions only visible in hosted mode made to the
version I posted, that adds some missing end-of-comment markers for the
added dg directives, and moving the new dg directive to the end so as to
not disturb line numbers.  I've got a fully fixed and properly tested
version, but since it's about as big as the original patch, I'll only
post it upon request.

(in case anyone's interested, it's one of the changes in
refs/users/aoliva/heads/testme that's not in
refs/users/aoliva/headers/testbase right now)

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: testsuite: introduce hostedlib effective target
  2023-11-08 16:29   ` Alexandre Oliva
@ 2023-11-09 21:42     ` Mike Stump
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 2023-11-09 21:42 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches, Rainer Orth

On Nov 8, 2023, at 8:29 AM, Alexandre Oliva <oliva@adacore.com> wrote:
> 
> On Nov  5, 2023, Mike Stump <mikestump@comcast.net> wrote:
> 
>> that, otherwise, I'll approve this version.
> 
> FWIW, this version is not usable as is.  Something went wrong in my
> testing, and several regressions only visible in hosted mode made to the
> version I posted, that adds some missing end-of-comment markers for the
> added dg directives, and moving the new dg directive to the end so as to
> not disturb line numbers.  I've got a fully fixed and properly tested
> version, but since it's about as big as the original patch, I'll only
> post it upon request.

Updates and fixes to the original plan are fine.

I'm still planning on letting you decide based upon input from everyone.  :-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-09 21:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02  1:11 testsuite: introduce hostedlib effective target Alexandre Oliva
2023-11-05 20:40 ` Mike Stump
2023-11-07 10:04   ` Alexandre Oliva
2023-11-07 10:18     ` Jonathan Wakely
2023-11-07 10:24       ` Jonathan Wakely
2023-11-07 10:37         ` Jonathan Wakely
2023-11-08 15:30           ` Alexandre Oliva
2023-11-08 15:48             ` Jonathan Wakely
2023-11-08 15:49               ` Jonathan Wakely
2023-11-08 16:29   ` Alexandre Oliva
2023-11-09 21:42     ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).