diff mbox series

[v2] testsuite: introduce hostedlib effective target

Message ID ory148rlbl.fsf_-_@lxoliva.fsfla.org
State New
Headers show
Series [v2] testsuite: introduce hostedlib effective target | expand

Commit Message

Alexandre Oliva Sept. 4, 2024, 6:21 a.m. UTC
On Nov  9, 2023, Mike Stump <mikestump@comcast.net> wrote:

> 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

> Updates and fixes to the original plan are fine.

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

Here's an updated and refreshed version that gets trunk built with
--disable-hosted-libstdcxx on x86_64-linux-gnu to not get any spurious
fails during in-tree testing.  Also bootstrapped on hosted
x86_64-linux-gnu.  Ok to install?


Several C++ tests fail with --disable-hosted-libstdcxx, whether
because stdc++exp 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, malloc, etc, 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.


Co-Authored-By: Olivier Hainque <hainque@adacore.com>

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/contracts/pr110159.C: Likewise.
	* g++.dg/contracts/pr115434.C: Likewise.  Adjust line numbers.
	* c-c++-common/pr36513-2.c: Skip if !hostedlib because of
	unavailable headers.
	* c-c++-common/analyzer/pr93290.c: Likewise.
	* g++.dg/analyzer/pr93212.C: Likewise.
	* g++.dg/analyzer/vfunc-2.C: Likewise.
	* g++.dg/cdce3.C: Likewise.  Adjust line numbers.
	* 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/contracts/contracts-assume2.C: Likewise.
	* g++.dg/contracts/contracts-ignore2.C: Likewise.
	* g++.dg/contracts/contracts-post7.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/pr100772-b.C: Likewise.
	* g++.dg/coroutines/pr101133.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/pr110635.C: Likewise.
	* g++.dg/coroutines/pr110871.C: Likewise.  Adjust line numbers.
	* g++.dg/coroutines/pr110872.C: Likewise.  Likewise.
	* g++.dg/coroutines/pr94288.C: Likewise.
	* g++.dg/coroutines/pr95520.C: Likewise.
	* g++.dg/coroutines/pr95736.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/ramp-return-a.C: Likewise.
	* g++.dg/coroutines/ramp-return-b.C: Likewise.
	* g++.dg/coroutines/ramp-return-c.C: Likewise.
	* g++.dg/coroutines/symmetric-transfer-00-basic.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/extern-c-coroutine.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/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/coroutines/torture/pr98704.C: Likewise.
	* g++.dg/cpp/pr80005.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-extended-id-1.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-string-literal.C: Likewise.
	* g++.dg/cpp0x/udlit-suffix-neg.C: Likewise.
	* g++.dg/cpp1y/udlit-userdef-string.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/feat-cxx14.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/constexpr-asm-1.C: Likewise.
	* g++.dg/cpp1z/constexpr-asm-3.C: Likewise.
	* g++.dg/cpp1z/decomp37.C: Likewise.
	* g++.dg/cpp1z/eval-order2.C: Likewise.
	* g++.dg/cpp1z/feat-cxx1z.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/cpp23/ext-floating12.C: Likewise.
	* g++.dg/cpp23/feat-cxx2b.C: Likewise.
	* g++.dg/cpp26/constexpr-voidptr1.C: Likewise.
	* g++.dg/cpp26/feat-cxx26.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/feat-cxx2a.C: Likewise.
	* g++.dg/cpp2a/nontype-float1.C: Likewise.
	* g++.dg/diagnostic/disable.C: Likewise.
	* g++.dg/diagnostic/missing-header-pr110164.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/builtin10.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/gcov/gcov-14.C: Likewise.
	* g++.dg/gcov/gcov-18.C: Likewise.
	* g++.dg/gcov/pr88045.C: Likewise.
	* g++.dg/gcov/pr88263-2.C: Likewise.
	* g++.dg/gcov/pr88263.C: Likewise.
	* g++.dg/gomp/has_device_addr-non-lvalue-1.C: Likewise.
	* g++.dg/gomp/ind-base-3.C: Likewise.
	* g++.dg/gomp/map-assignment-1.C: Likewise.
	* g++.dg/gomp/map-lvalue-ref-1.C: Likewise.
	* g++.dg/gomp/map-ptrmem-1.C: Likewise.
	* g++.dg/gomp/map-ptrmem-2.C: Likewise.
	* g++.dg/gomp/map-static-cast-lvalue-1.C: Likewise.
	* g++.dg/gomp/map-ternary-1.C: Likewise.
	* g++.dg/gomp/member-array-2.C: Likewise.
	* g++.dg/gomp/pr71910.C: Likewise.
	* g++.dg/gomp/pr91118-1.C: Likewise.
	* g++.dg/gomp/sink-2.C: Likewise.
	* g++.dg/gomp/target-this-3.C: Likewise.
	* g++.dg/gomp/target-this-4.C: Likewise.
	* g++.dg/gomp/tile-1.C: Likewise.
	* g++.dg/gomp/tile-2.C: Likewise.
	* g++.dg/gomp/unroll-1.C: Likewise.
	* g++.dg/gomp/unroll-2.C: Likewise.
	* g++.dg/gomp/unroll-3.C: Likewise.
	* g++.dg/graphite/id-1.C: Likewise.
	* g++.dg/graphite/pr42130.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/pr80287_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/hello-2_a.C: Likewise.
	* g++.dg/modules/hello-2_b.C: Likewise.
	* g++.dg/modules/iostream-1_a.H: Likewise.
	* g++.dg/modules/p1689-2.C: Likewise.
	* g++.dg/modules/part-5_c.C: Likewise.
	* g++.dg/modules/pr99023_a.X: Likewise.
	* g++.dg/modules/pr99166_a.X: Likewise.
	* g++.dg/modules/pr99166_b.C: Likewise.
	* g++.dg/modules/pr99425-2_a.X: Likewise.
	* g++.dg/modules/pr99425-2_b.X: 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/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-7_a.H: Likewise.
	* g++.dg/modules/xtreme-header-7_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/builtins2.C: Likewise.
	* g++.dg/opt/dtor4-aux.cc: Likewise.
	* g++.dg/opt/dtor4.C: Likewise.
	* g++.dg/opt/nrv17.C: Likewise.
	* g++.dg/opt/pr102970.C: Likewise.
	* g++.dg/opt/pr109434.C: Likewise.
	* g++.dg/opt/pr110879.C: Likewise.
	* g++.dg/opt/pr15551.C: Likewise.
	* g++.dg/opt/pr30965.C: Likewise.
	* g++.dg/opt/pr65074.C: Likewise.
	* g++.dg/opt/pr66119.C: Likewise.
	* g++.dg/opt/pr77844.C: Likewise.
	* g++.dg/opt/pr85393.C: Likewise.
	* g++.dg/opt/pr94223.C: Likewise.
	* g++.dg/other/final7.C: Likewise.
	* g++.dg/other/pr40561.C: Likewise.
	* g++.dg/parse/lookup1.C: Likewise.
	* g++.dg/parse/parse5.C: Likewise.
	* g++.dg/pch/system-1.C: Likewise.
	* g++.dg/pch/system-1.Hs: Likewise.
	* g++.dg/pch/system-2.C: Likewise.
	* g++.dg/pch/system-2.Hs: 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/tm/inherit2.C: Likewise.
	* g++.dg/tm/pr46270.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/pr49938.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/pr86763.C: Likewise.
	* g++.dg/torture/pr95493-1.C: Likewise.
	* g++.dg/tree-ssa/allocator-opt1.C: Likewise.
	* g++.dg/tree-ssa/copyprop.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/initlist-opt5.C: Likewise.
	* g++.dg/tree-ssa/loop-cond-split-1.C: Likewise.
	* g++.dg/tree-ssa/loop-split-1.C: Likewise.
	* g++.dg/tree-ssa/pr101839.C: Likewise.
	* g++.dg/tree-ssa/pr104529.C: Likewise.
	* g++.dg/tree-ssa/pr109849.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/uninit-pr105937.C: Likewise.
	* g++.dg/vect/pr102421.cc: Likewise.
	* g++.dg/vect/pr105053.cc: Likewise.
	* g++.dg/vect/pr33426-ivdep-4.cc: Likewise.
	* g++.dg/vect/pr64410.cc: Likewise.
	* g++.dg/vect/slp-pr87105.cc: Likewise.
	* g++.dg/vect/vect-novector-pragma.cc: 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-reference14.C: Likewise.
	* g++.dg/warn/Wdangling-reference17.C: Likewise.
	* g++.dg/warn/Wdangling-reference4.C: Likewise.
	* g++.dg/warn/Wdangling-reference5.C: Likewise.
	* g++.dg/warn/Wfree-nonheap-object-3.C: Likewise.
	* g++.dg/warn/Winline-3.C: Likewise.
	* g++.dg/warn/Wmemset-elt-size1.C: Likewise.
	* g++.dg/warn/Wparentheses-34.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-6.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/Wuninitialized-pr111123-1.C: Likewise.
	* g++.dg/warn/format1.C: Likewise.
	* g++.dg/warn/huge-val1.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/2371.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++.law/weak.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++.target/i386/pr105638.C: Likewise.
	* g++.target/i386/pr110170.C: Likewise.
	* g++.target/i386/pr80566-1.C: Likewise.
	* g++.target/i386/pr80566-2.C: Likewise.
	* c-c++-common/analyzer/allocation-size-1.c: Skip if
	!hostedlib because of unavailable declarations.
	* c-c++-common/analyzer/allocation-size-2.c: Likewise.
	* c-c++-common/analyzer/allocation-size-3.c: Likewise.
	* c-c++-common/analyzer/allocation-size-4.c: Likewise.
	* c-c++-common/analyzer/analyzer-verbosity-0.c: Likewise.
	* c-c++-common/analyzer/analyzer-verbosity-1.c: Likewise.
	* c-c++-common/analyzer/analyzer-verbosity-2.c: Likewise.
	* c-c++-common/analyzer/analyzer-verbosity-3.c: Likewise.
	* c-c++-common/analyzer/call-summaries-1.c: Likewise.
	* c-c++-common/analyzer/call-summaries-malloc.c: Likewise.
	* c-c++-common/analyzer/callbacks-1.c: Likewise.
	* c-c++-common/analyzer/callbacks-2.c: Likewise.
	* c-c++-common/analyzer/capacity-1.c: Likewise.
	* c-c++-common/analyzer/capacity-2.c: Likewise.
	* c-c++-common/analyzer/capacity-3.c: Likewise.
	* c-c++-common/analyzer/compound-assignment-1.c: Likewise.
	* c-c++-common/analyzer/data-model-14.c: Likewise.
	* c-c++-common/analyzer/data-model-20.c: Likewise.
	* c-c++-common/analyzer/data-model-5d.c: Likewise.
	* c-c++-common/analyzer/disabling.c: Likewise.
	* c-c++-common/analyzer/dump-state.c: Likewise.
	* c-c++-common/analyzer/edges-2.c: Likewise.
	* c-c++-common/analyzer/first-field-2.c: Likewise.
	* c-c++-common/analyzer/flex-with-call-summaries.c: Likewise.
	* c-c++-common/analyzer/flex-without-call-summaries.c:
	Likewise.
	* c-c++-common/analyzer/flexible-array-member-1.c: Likewise.
	* c-c++-common/analyzer/function-ptr-2.c: Likewise.
	* c-c++-common/analyzer/function-ptr-3.c: Likewise.
	* c-c++-common/analyzer/function-ptr-4.c: Likewise.
	* c-c++-common/analyzer/gzio.c: Likewise.
	* c-c++-common/analyzer/imprecise-floating-point-1.c:
	Likewise.
	* c-c++-common/analyzer/leak-2.c: Likewise.
	* c-c++-common/analyzer/leak-3.c: Likewise.
	* c-c++-common/analyzer/leak-4.c: Likewise.
	* c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c:
	Likewise.
	* c-c++-common/analyzer/loop-3.c: Likewise.
	* c-c++-common/analyzer/malloc-3.c: Likewise.
	* c-c++-common/analyzer/malloc-5.c: Likewise.
	* c-c++-common/analyzer/malloc-CWE-401-example.c: Likewise.
	* c-c++-common/analyzer/malloc-CWE-415-examples.c: Likewise.
	* c-c++-common/analyzer/malloc-CWE-416-examples.c: Likewise.
	* c-c++-common/analyzer/malloc-CWE-590-examples.c: Likewise.
	* c-c++-common/analyzer/malloc-callbacks.c: Likewise.
	* c-c++-common/analyzer/malloc-dce.c: Likewise.
	* c-c++-common/analyzer/malloc-dedupe-1.c: Likewise.
	* c-c++-common/analyzer/malloc-in-loop.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-1.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-10.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-11.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-12.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-13a.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-2.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-3.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-4.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-5.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-6.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-7.c: Likewise.
	* c-c++-common/analyzer/malloc-ipa-9.c: Likewise.
	* c-c++-common/analyzer/malloc-macro-inline-events.c:
	Likewise.
	* c-c++-common/analyzer/malloc-macro-separate-events.c:
	Likewise.
	* c-c++-common/analyzer/malloc-many-paths-3.c: Likewise.
	* c-c++-common/analyzer/malloc-meaning-1.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-1.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-2.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-3.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-4.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-5.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-6.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-7.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-8.c: Likewise.
	* c-c++-common/analyzer/malloc-paths-9-noexcept.c: Likewise.
	* c-c++-common/analyzer/malloc-sarif-1.c: Likewise.
	* c-c++-common/analyzer/malloc-vs-local-1a.c: Likewise.
	* c-c++-common/analyzer/malloc-vs-local-1b.c: Likewise.
	* c-c++-common/analyzer/malloc-vs-local-2.c: Likewise.
	* c-c++-common/analyzer/malloc-vs-local-3.c: Likewise.
	* c-c++-common/analyzer/out-of-bounds-1.c: Likewise.
	* c-c++-common/analyzer/out-of-bounds-2.c: Likewise.
	* c-c++-common/analyzer/out-of-bounds-diagram-3.c: Likewise.
	* c-c++-common/analyzer/out-of-bounds-diagram-8.c: Likewise.
	* c-c++-common/analyzer/paths-3.c: Likewise.
	* c-c++-common/analyzer/paths-6.c: Likewise.
	* c-c++-common/analyzer/paths-7.c: Likewise.
	* c-c++-common/analyzer/pr103526.c: Likewise.
	* c-c++-common/analyzer/pr106539.c: Likewise.
	* c-c++-common/analyzer/pr94399.c: Likewise.
	* c-c++-common/analyzer/pr94851-1.c: Likewise.
	* c-c++-common/analyzer/pr94851-2.c: Likewise.
	* c-c++-common/analyzer/pr94851-4.c: Likewise.
	* c-c++-common/analyzer/pr97608.c: Likewise.
	* c-c++-common/analyzer/pr98918.c: Likewise.
	* c-c++-common/analyzer/pr99716-2.c: Likewise.
	* c-c++-common/analyzer/pr99716-3.c: Likewise.
	* c-c++-common/analyzer/pragma-1.c: Likewise.
	* c-c++-common/analyzer/pragma-2.c: Likewise.
	* c-c++-common/analyzer/sarif-path-role.c: Likewise.
	* c-c++-common/analyzer/scope-1.c: Likewise.
	* c-c++-common/analyzer/strndup-1.c: Likewise.
	* c-c++-common/analyzer/taint-alloc-3.c: Likewise.
	* c-c++-common/analyzer/taint-realloc.c: Likewise.
	* c-c++-common/analyzer/use-after-free-3.c: Likewise.
	* c-c++-common/analyzer/zlib-4.c: Likewise.
	* c-c++-common/goacc/kernels-counter-vars-function-scope.c:
	Likewise.
	* c-c++-common/goacc/kernels-loop-2.c: Likewise.
	* c-c++-common/goacc/kernels-loop-3.c: Likewise.
	* c-c++-common/goacc/kernels-loop-data-2.c: Likewise.
	* c-c++-common/goacc/kernels-loop-data-enter-exit-2.c:
	Likewise.
	* c-c++-common/goacc/kernels-loop-data-enter-exit.c:
	Likewise.
	* c-c++-common/goacc/kernels-loop-data-update.c: Likewise.
	* c-c++-common/goacc/kernels-loop-data.c: Likewise.
	* c-c++-common/goacc/kernels-loop-g.c: Likewise.
	* c-c++-common/goacc/kernels-loop-mod-not-zero.c: Likewise.
	* c-c++-common/goacc/kernels-loop-n.c: Likewise.
	* c-c++-common/goacc/kernels-loop.c: Likewise.
	* c-c++-common/goacc/kernels-one-counter-var.c: Likewise.
	* c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c:
	Likewise.
	* c-c++-common/gomp/pr103642.c: Likewise.
	* c-c++-common/gomp/target-implicit-map-2.c: Likewise.
	* c-c++-common/simulate-thread/bitfields-4.c: Likewise.
	* c-c++-common/tm/malloc.c: Likewise.
	* g++.dg/abi/mangle36.C: Likewise.
	* g++.dg/abi/mangle40.C: Likewise.
	* g++.dg/abi/mangle41.C: Likewise.
	* g++.dg/analyzer/cstdlib.C: Likewise.
	* g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C:
	Likewise.
	* g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C:
	Likewise.
	* g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C:
	Likewise.
	* g++.dg/analyzer/malloc.C: Likewise.
	* g++.dg/analyzer/new-vs-malloc.C: Likewise.
	* g++.dg/analyzer/placement-new-size.C: Likewise.
	* g++.dg/analyzer/vfunc-3.C: Likewise.
	* g++.dg/analyzer/vfunc-5.C: Likewise.
	* g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C:
	Likewise.
	* g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C:
	Likewise.
	* g++.dg/coroutines/pr101765.C: Likewise.
	* 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-03-tmpl-nondependent.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/cpp0x/lambda/lambda-std-function.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-this8.C: Likewise.
	* g++.dg/cpp0x/pr70887.C: Likewise.
	* g++.dg/cpp1y/lambda-generic-variadic2.C: Likewise.
	* g++.dg/cpp23/subscript5.C: Likewise.
	* g++.dg/cpp23/subscript6.C: Likewise.
	* g++.dg/cpp26/constexpr-new2.C: Likewise.
	* g++.dg/cpp2a/destroying-delete5.C: Likewise.
	* g++.dg/eh/filter2.C: Likewise.
	* g++.dg/eh/uncaught1.C: Likewise.
	* g++.dg/eh/uncaught2.C: Likewise.
	* g++.dg/expr/anew1.C: Likewise.
	* g++.dg/expr/anew2.C: Likewise.
	* g++.dg/expr/anew3.C: Likewise.
	* g++.dg/expr/anew4.C: Likewise.
	* g++.dg/ext/cleanup-10.C: Likewise.
	* g++.dg/ext/cleanup-11.C: Likewise.
	* g++.dg/ext/cleanup-5.C: Likewise.
	* g++.dg/ext/cleanup-8.C: Likewise.
	* g++.dg/ext/cleanup-9.C: Likewise.
	* g++.dg/ext/is_invocable2.C: Likewise.
	* g++.dg/goacc/pr107028-2.C: Likewise.
	* g++.dg/gomp/target-lambda-2.C: Likewise.
	* g++.dg/init/new11.C: Likewise.
	* g++.dg/init/value3.C: Likewise.
	* g++.dg/lto/pr66180_0.C: Likewise.
	* g++.dg/opt/eh4.C: Likewise.
	* g++.dg/opt/pr103989.C: Likewise.
	* g++.dg/opt/pr80385.C: Likewise.
	* g++.dg/opt/reload3.C: Likewise.
	* g++.dg/other/i386-1.C: Likewise.
	* g++.dg/other/i386-11.C: Likewise.
	* g++.dg/other/i386-2.C: Likewise.
	* g++.dg/other/i386-3.C: Likewise.
	* g++.dg/other/i386-4.C: Likewise.
	* g++.dg/other/i386-7.C: Likewise.
	* g++.dg/other/i386-8.C: Likewise.
	* g++.dg/other/mmintrin.C: Likewise.
	* g++.dg/other/pr34435.C: Likewise.
	* g++.dg/other/pr40446.C: Likewise.
	* g++.dg/other/pr49133.C: Likewise.
	* g++.dg/other/ucnid-1-utf8.C: Likewise.
	* g++.dg/other/ucnid-1.C: Likewise.
	* g++.dg/pr80481.C: Likewise.
	* g++.dg/torture/pr10148.C: Likewise.
	* g++.dg/torture/pr91334.C: Likewise.
	* g++.dg/torture/pr91606.C: Likewise.
	* g++.dg/tree-ssa/pr102216-2.C: Likewise.
	* g++.dg/vect/slp-pr98855.cc: Likewise.
	* g++.dg/warn/Wsystem-headers1a.C: Likewise.
	* g++.dg/warn/noreturn-1.C: Likewise.
	* g++.old-deja/g++.abi/arraynew.C: Likewise.
	* g++.old-deja/g++.abi/cxa_vec.C: Likewise.
	* g++.old-deja/g++.brendan/new3.C: Likewise.
	* g++.old-deja/g++.eh/new1.C: Likewise.
	* g++.old-deja/g++.eh/new2.C: Likewise.
	* g++.old-deja/g++.jason/template44.C: Likewise.
	* g++.old-deja/g++.law/arm13.C: Likewise.
	* g++.old-deja/g++.law/scope2.C: Likewise.
	* g++.old-deja/g++.mike/eh47.C: Likewise.
	* g++.old-deja/g++.mike/ns15.C: Likewise.
	* g++.old-deja/g++.mike/p710.C: Likewise.
	* g++.old-deja/g++.mike/p9706.C: Likewise.
	* g++.old-deja/g++.oliva/new1.C: Likewise.
	* g++.old-deja/g++.other/delete8.C: Likewise.
	* g++.target/i386/avx-pr54700-1.C: Likewise.
	* g++.target/i386/avx-pr54700-2.C: Likewise.
	* g++.target/i386/avx2-pr54700-1.C: Likewise.
	* g++.target/i386/avx2-pr54700-2.C: Likewise.
	* g++.target/i386/avx512bw-pr96246-2.C: Likewise.
	* g++.target/i386/avx512vl-pr54700-1a.C: Likewise.
	* g++.target/i386/avx512vl-pr54700-1b.C: Likewise.
	* g++.target/i386/avx512vl-pr54700-2a.C: Likewise.
	* g++.target/i386/avx512vl-pr54700-2b.C: Likewise.
	* g++.target/i386/avx512vl-pr96246-2.C: Likewise.
	* g++.target/i386/mvc4.C: Likewise.
	* g++.target/i386/pr100885.C: Likewise.
	* g++.target/i386/pr102166.C: Likewise.
	* g++.target/i386/pr103750-fwprop-1.C: Likewise.
	* g++.target/i386/pr105593.C: Likewise.
	* g++.target/i386/pr112443.C: Likewise.
	* g++.target/i386/pr113560.C: Likewise.
	* g++.target/i386/pr88152.C: Likewise.
	* g++.target/i386/pr88998.C: Likewise.
	* g++.target/i386/pr94046-1.C: Likewise.
	* g++.target/i386/pr94046-2.C: Likewise.
	* g++.target/i386/sse4_1-pr54700-1.C: Likewise.
	* g++.target/i386/sse4_1-pr54700-2.C: Likewise.
	* g++.dg/tree-ssa/pr20458.C: Skip if !hostedlib because of
	unavailable library definitions.
---
 gcc/doc/sourcebuild.texi                           |    4 ++++
 .../c-c++-common/analyzer/allocation-size-1.c      |    2 ++
 .../c-c++-common/analyzer/allocation-size-2.c      |    1 +
 .../c-c++-common/analyzer/allocation-size-3.c      |    1 +
 .../c-c++-common/analyzer/allocation-size-4.c      |    2 ++
 .../c-c++-common/analyzer/analyzer-verbosity-0.c   |    1 +
 .../c-c++-common/analyzer/analyzer-verbosity-1.c   |    1 +
 .../c-c++-common/analyzer/analyzer-verbosity-2.c   |    1 +
 .../c-c++-common/analyzer/analyzer-verbosity-3.c   |    1 +
 .../c-c++-common/analyzer/call-summaries-1.c       |    1 +
 .../c-c++-common/analyzer/call-summaries-malloc.c  |    1 +
 gcc/testsuite/c-c++-common/analyzer/callbacks-1.c  |    2 ++
 gcc/testsuite/c-c++-common/analyzer/callbacks-2.c  |    2 ++
 gcc/testsuite/c-c++-common/analyzer/capacity-1.c   |    1 +
 gcc/testsuite/c-c++-common/analyzer/capacity-2.c   |    1 +
 gcc/testsuite/c-c++-common/analyzer/capacity-3.c   |    1 +
 .../c-c++-common/analyzer/compound-assignment-1.c  |    2 ++
 .../c-c++-common/analyzer/data-model-14.c          |    2 ++
 .../c-c++-common/analyzer/data-model-20.c          |    1 +
 .../c-c++-common/analyzer/data-model-5d.c          |    2 ++
 gcc/testsuite/c-c++-common/analyzer/disabling.c    |    2 ++
 gcc/testsuite/c-c++-common/analyzer/dump-state.c   |    2 ++
 gcc/testsuite/c-c++-common/analyzer/edges-2.c      |    2 ++
 .../c-c++-common/analyzer/first-field-2.c          |    2 ++
 .../analyzer/flex-with-call-summaries.c            |    1 +
 .../analyzer/flex-without-call-summaries.c         |    2 ++
 .../analyzer/flexible-array-member-1.c             |    2 ++
 .../c-c++-common/analyzer/function-ptr-2.c         |    2 ++
 .../c-c++-common/analyzer/function-ptr-3.c         |    2 ++
 .../c-c++-common/analyzer/function-ptr-4.c         |    2 ++
 gcc/testsuite/c-c++-common/analyzer/gzio.c         |    2 ++
 .../analyzer/imprecise-floating-point-1.c          |    1 +
 gcc/testsuite/c-c++-common/analyzer/leak-2.c       |    2 ++
 gcc/testsuite/c-c++-common/analyzer/leak-3.c       |    2 ++
 gcc/testsuite/c-c++-common/analyzer/leak-4.c       |    2 ++
 .../analyzer/loop-0-up-to-n-by-1-with-iter-obj.c   |    2 ++
 gcc/testsuite/c-c++-common/analyzer/loop-3.c       |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-3.c     |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-5.c     |    2 ++
 .../c-c++-common/analyzer/malloc-CWE-401-example.c |    2 ++
 .../analyzer/malloc-CWE-415-examples.c             |    2 ++
 .../analyzer/malloc-CWE-416-examples.c             |    2 ++
 .../analyzer/malloc-CWE-590-examples.c             |    1 +
 .../c-c++-common/analyzer/malloc-callbacks.c       |    1 +
 gcc/testsuite/c-c++-common/analyzer/malloc-dce.c   |    1 +
 .../c-c++-common/analyzer/malloc-dedupe-1.c        |    2 ++
 .../c-c++-common/analyzer/malloc-in-loop.c         |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-1.c |    2 ++
 .../c-c++-common/analyzer/malloc-ipa-10.c          |    2 ++
 .../c-c++-common/analyzer/malloc-ipa-11.c          |    1 +
 .../c-c++-common/analyzer/malloc-ipa-12.c          |    2 ++
 .../c-c++-common/analyzer/malloc-ipa-13a.c         |    1 +
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-2.c |    1 +
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-3.c |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-4.c |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-5.c |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-6.c |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-7.c |    2 ++
 gcc/testsuite/c-c++-common/analyzer/malloc-ipa-9.c |    1 +
 .../analyzer/malloc-macro-inline-events.c          |    1 +
 .../analyzer/malloc-macro-separate-events.c        |    1 +
 .../c-c++-common/analyzer/malloc-many-paths-3.c    |    2 ++
 .../c-c++-common/analyzer/malloc-meaning-1.c       |    1 +
 .../c-c++-common/analyzer/malloc-paths-1.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-2.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-3.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-4.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-5.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-6.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-7.c         |    2 ++
 .../c-c++-common/analyzer/malloc-paths-8.c         |    1 +
 .../analyzer/malloc-paths-9-noexcept.c             |    1 +
 .../c-c++-common/analyzer/malloc-sarif-1.c         |    1 +
 .../c-c++-common/analyzer/malloc-vs-local-1a.c     |    1 +
 .../c-c++-common/analyzer/malloc-vs-local-1b.c     |    1 +
 .../c-c++-common/analyzer/malloc-vs-local-2.c      |    2 ++
 .../c-c++-common/analyzer/malloc-vs-local-3.c      |    2 ++
 .../c-c++-common/analyzer/out-of-bounds-1.c        |    2 ++
 .../c-c++-common/analyzer/out-of-bounds-2.c        |    2 ++
 .../analyzer/out-of-bounds-diagram-3.c             |    1 +
 .../analyzer/out-of-bounds-diagram-8.c             |    1 +
 gcc/testsuite/c-c++-common/analyzer/paths-3.c      |    1 +
 gcc/testsuite/c-c++-common/analyzer/paths-6.c      |    2 ++
 gcc/testsuite/c-c++-common/analyzer/paths-7.c      |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr103526.c     |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr106539.c     |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr93290.c      |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr94399.c      |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr94851-1.c    |    1 +
 gcc/testsuite/c-c++-common/analyzer/pr94851-2.c    |    1 +
 gcc/testsuite/c-c++-common/analyzer/pr94851-4.c    |    1 +
 gcc/testsuite/c-c++-common/analyzer/pr97608.c      |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr98918.c      |    1 +
 gcc/testsuite/c-c++-common/analyzer/pr99716-2.c    |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pr99716-3.c    |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pragma-1.c     |    2 ++
 gcc/testsuite/c-c++-common/analyzer/pragma-2.c     |    1 +
 .../c-c++-common/analyzer/sarif-path-role.c        |    1 +
 gcc/testsuite/c-c++-common/analyzer/scope-1.c      |    2 ++
 gcc/testsuite/c-c++-common/analyzer/strndup-1.c    |    1 +
 .../c-c++-common/analyzer/taint-alloc-3.c          |    2 ++
 .../c-c++-common/analyzer/taint-realloc.c          |    2 ++
 .../c-c++-common/analyzer/use-after-free-3.c       |    2 ++
 gcc/testsuite/c-c++-common/analyzer/zlib-4.c       |    2 ++
 .../goacc/kernels-counter-vars-function-scope.c    |    1 +
 gcc/testsuite/c-c++-common/goacc/kernels-loop-2.c  |    1 +
 gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c  |    1 +
 .../c-c++-common/goacc/kernels-loop-data-2.c       |    1 +
 .../goacc/kernels-loop-data-enter-exit-2.c         |    1 +
 .../goacc/kernels-loop-data-enter-exit.c           |    1 +
 .../c-c++-common/goacc/kernels-loop-data-update.c  |    1 +
 .../c-c++-common/goacc/kernels-loop-data.c         |    1 +
 gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c  |    1 +
 .../c-c++-common/goacc/kernels-loop-mod-not-zero.c |    1 +
 gcc/testsuite/c-c++-common/goacc/kernels-loop-n.c  |    1 +
 gcc/testsuite/c-c++-common/goacc/kernels-loop.c    |    1 +
 .../c-c++-common/goacc/kernels-one-counter-var.c   |    1 +
 .../goacc/kernels-parallel-loop-data-enter-exit.c  |    1 +
 gcc/testsuite/c-c++-common/gomp/pr103642.c         |    1 +
 .../c-c++-common/gomp/target-implicit-map-2.c      |    2 ++
 gcc/testsuite/c-c++-common/pr36513-2.c             |    1 +
 .../c-c++-common/simulate-thread/bitfields-4.c     |    1 +
 gcc/testsuite/c-c++-common/tm/malloc.c             |    1 +
 gcc/testsuite/g++.dg/abi/mangle36.C                |    1 +
 gcc/testsuite/g++.dg/abi/mangle40.C                |    1 +
 gcc/testsuite/g++.dg/abi/mangle41.C                |    1 +
 gcc/testsuite/g++.dg/analyzer/cstdlib.C            |    2 ++
 ...nalyzer-show-events-in-system-headers-default.C |    1 +
 .../fanalyzer-show-events-in-system-headers-no.C   |    1 +
 .../fanalyzer-show-events-in-system-headers.C      |    1 +
 gcc/testsuite/g++.dg/analyzer/malloc.C             |    1 +
 gcc/testsuite/g++.dg/analyzer/new-vs-malloc.C      |    2 ++
 gcc/testsuite/g++.dg/analyzer/placement-new-size.C |    1 +
 gcc/testsuite/g++.dg/analyzer/pr93212.C            |    1 +
 gcc/testsuite/g++.dg/analyzer/vfunc-2.C            |    1 +
 gcc/testsuite/g++.dg/analyzer/vfunc-3.C            |    2 ++
 gcc/testsuite/g++.dg/analyzer/vfunc-5.C            |    1 +
 gcc/testsuite/g++.dg/cdce3.C                       |    5 +++--
 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/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-post7.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/contracts/pr110159.C          |    1 +
 gcc/testsuite/g++.dg/contracts/pr115434.C          |    3 ++-
 .../coro-bad-gro-00-class-gro-scalar-return.C      |    2 ++
 .../coro-bad-gro-01-void-gro-non-class-coro.C      |    2 ++
 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/pr110635.C         |    1 +
 gcc/testsuite/g++.dg/coroutines/pr110871.C         |    4 +++-
 gcc/testsuite/g++.dg/coroutines/pr110872.C         |    3 ++-
 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 +
 .../coroutines/symmetric-transfer-00-basic.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 +
 .../torture/co-yield-03-tmpl-nondependent.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/cpp/pr80005.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 +
 .../g++.dg/cpp0x/lambda/lambda-std-function.C      |    1 +
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C   |    1 +
 gcc/testsuite/g++.dg/cpp0x/nullptr20.C             |    1 +
 gcc/testsuite/g++.dg/cpp0x/pr61038.C               |    1 +
 gcc/testsuite/g++.dg/cpp0x/pr70887.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-extended-id-1.C   |    2 ++
 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 +
 gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C            |    1 +
 .../g++.dg/cpp1y/lambda-generic-69078-2.C          |    1 +
 .../g++.dg/cpp1y/lambda-generic-variadic2.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/constexpr-asm-1.C       |    1 +
 gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C       |    1 +
 gcc/testsuite/g++.dg/cpp1z/decomp37.C              |    1 +
 gcc/testsuite/g++.dg/cpp1z/eval-order2.C           |    1 +
 gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.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/ext-floating12.C        |    1 +
 gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C            |    1 +
 gcc/testsuite/g++.dg/cpp23/subscript5.C            |    1 +
 gcc/testsuite/g++.dg/cpp23/subscript6.C            |    1 +
 gcc/testsuite/g++.dg/cpp26/constexpr-new2.C        |    1 +
 gcc/testsuite/g++.dg/cpp26/constexpr-voidptr1.C    |    1 +
 gcc/testsuite/g++.dg/cpp26/feat-cxx26.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/destroying-delete5.C    |    1 +
 gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C            |    1 +
 gcc/testsuite/g++.dg/cpp2a/nontype-float1.C        |    1 +
 gcc/testsuite/g++.dg/diagnostic/disable.C          |    1 +
 .../g++.dg/diagnostic/missing-header-pr110164.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/expr/anew1.C                  |    2 ++
 gcc/testsuite/g++.dg/expr/anew2.C                  |    2 ++
 gcc/testsuite/g++.dg/expr/anew3.C                  |    2 ++
 gcc/testsuite/g++.dg/expr/anew4.C                  |    2 ++
 gcc/testsuite/g++.dg/ext/bases.C                   |    1 +
 gcc/testsuite/g++.dg/ext/builtin-line1.C           |    1 +
 gcc/testsuite/g++.dg/ext/builtin10.C               |    1 +
 gcc/testsuite/g++.dg/ext/cleanup-10.C              |    1 +
 gcc/testsuite/g++.dg/ext/cleanup-11.C              |    1 +
 gcc/testsuite/g++.dg/ext/cleanup-5.C               |    1 +
 gcc/testsuite/g++.dg/ext/cleanup-8.C               |    1 +
 gcc/testsuite/g++.dg/ext/cleanup-9.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_invocable2.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/gcov/gcov-14.C                |    1 +
 gcc/testsuite/g++.dg/gcov/gcov-18.C                |    1 +
 gcc/testsuite/g++.dg/gcov/pr88045.C                |    1 +
 gcc/testsuite/g++.dg/gcov/pr88263-2.C              |    1 +
 gcc/testsuite/g++.dg/gcov/pr88263.C                |    1 +
 gcc/testsuite/g++.dg/goacc/pr107028-2.C            |    1 +
 .../g++.dg/gomp/has_device_addr-non-lvalue-1.C     |    1 +
 gcc/testsuite/g++.dg/gomp/ind-base-3.C             |    2 ++
 gcc/testsuite/g++.dg/gomp/map-assignment-1.C       |    2 ++
 gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C       |    2 ++
 gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C           |    2 ++
 gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C           |    2 ++
 .../g++.dg/gomp/map-static-cast-lvalue-1.C         |    2 ++
 gcc/testsuite/g++.dg/gomp/map-ternary-1.C          |    2 ++
 gcc/testsuite/g++.dg/gomp/member-array-2.C         |    2 ++
 gcc/testsuite/g++.dg/gomp/pr71910.C                |    1 +
 gcc/testsuite/g++.dg/gomp/pr91118-1.C              |    1 +
 gcc/testsuite/g++.dg/gomp/sink-2.C                 |    1 +
 gcc/testsuite/g++.dg/gomp/target-lambda-2.C        |    2 ++
 gcc/testsuite/g++.dg/gomp/target-this-3.C          |    2 ++
 gcc/testsuite/g++.dg/gomp/target-this-4.C          |    2 ++
 gcc/testsuite/g++.dg/gomp/tile-1.C                 |    1 +
 gcc/testsuite/g++.dg/gomp/tile-2.C                 |    1 +
 gcc/testsuite/g++.dg/gomp/unroll-1.C               |    1 +
 gcc/testsuite/g++.dg/gomp/unroll-2.C               |    1 +
 gcc/testsuite/g++.dg/gomp/unroll-3.C               |    1 +
 gcc/testsuite/g++.dg/graphite/id-1.C               |    2 ++
 gcc/testsuite/g++.dg/graphite/pr42130.C            |    5 +++--
 gcc/testsuite/g++.dg/inherit/virtual8.C            |    1 +
 gcc/testsuite/g++.dg/init/array4.C                 |    1 +
 gcc/testsuite/g++.dg/init/new11.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/init/value3.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              |    2 ++
 gcc/testsuite/g++.dg/lto/20091022-2_0.C            |    1 +
 gcc/testsuite/g++.dg/lto/20091219_0.C              |    1 +
 gcc/testsuite/g++.dg/lto/pr66180_0.C               |    2 ++
 gcc/testsuite/g++.dg/lto/pr80287_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       |    2 ++
 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       |    2 ++
 gcc/testsuite/g++.dg/modules/contracts-4_a.C       |    1 +
 gcc/testsuite/g++.dg/modules/contracts-4_d.C       |    2 ++
 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/hello-2_a.C           |    1 +
 gcc/testsuite/g++.dg/modules/hello-2_b.C           |    1 +
 gcc/testsuite/g++.dg/modules/iostream-1_a.H        |    1 +
 gcc/testsuite/g++.dg/modules/p1689-2.C             |    1 +
 gcc/testsuite/g++.dg/modules/part-5_c.C            |    1 +
 gcc/testsuite/g++.dg/modules/pr99023_a.X           |    1 +
 gcc/testsuite/g++.dg/modules/pr99166_a.X           |    1 +
 gcc/testsuite/g++.dg/modules/pr99166_b.C           |    2 ++
 gcc/testsuite/g++.dg/modules/pr99425-2_a.X         |    1 +
 gcc/testsuite/g++.dg/modules/pr99425-2_b.X         |    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-7_a.H   |    1 +
 gcc/testsuite/g++.dg/modules/xtreme-header-7_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/builtins2.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/pr103989.C                |    1 +
 gcc/testsuite/g++.dg/opt/pr109434.C                |    1 +
 gcc/testsuite/g++.dg/opt/pr110879.C                |    1 +
 gcc/testsuite/g++.dg/opt/pr15551.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr30965.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr65074.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr66119.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr77844.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr80385.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr85393.C                 |    1 +
 gcc/testsuite/g++.dg/opt/pr94223.C                 |    1 +
 gcc/testsuite/g++.dg/opt/reload3.C                 |    1 +
 gcc/testsuite/g++.dg/other/final7.C                |    1 +
 gcc/testsuite/g++.dg/other/i386-1.C                |    1 +
 gcc/testsuite/g++.dg/other/i386-11.C               |    1 +
 gcc/testsuite/g++.dg/other/i386-2.C                |    1 +
 gcc/testsuite/g++.dg/other/i386-3.C                |    1 +
 gcc/testsuite/g++.dg/other/i386-4.C                |    1 +
 gcc/testsuite/g++.dg/other/i386-7.C                |    1 +
 gcc/testsuite/g++.dg/other/i386-8.C                |    1 +
 gcc/testsuite/g++.dg/other/mmintrin.C              |    1 +
 gcc/testsuite/g++.dg/other/pr34435.C               |    1 +
 gcc/testsuite/g++.dg/other/pr40446.C               |    1 +
 gcc/testsuite/g++.dg/other/pr40561.C               |    1 +
 gcc/testsuite/g++.dg/other/pr49133.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-1.Hs               |    2 ++
 gcc/testsuite/g++.dg/pch/system-2.C                |    2 ++
 gcc/testsuite/g++.dg/pch/system-2.Hs               |    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/pr80481.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/tm/inherit2.C                 |    1 +
 gcc/testsuite/g++.dg/tm/pr46270.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/pr10148.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/pr86763.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr91334.C             |    1 +
 gcc/testsuite/g++.dg/torture/pr91606.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/copyprop.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/initlist-opt5.C      |    1 +
 gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C  |    1 +
 gcc/testsuite/g++.dg/tree-ssa/loop-split-1.C       |    2 ++
 gcc/testsuite/g++.dg/tree-ssa/pr101839.C           |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C         |    2 ++
 gcc/testsuite/g++.dg/tree-ssa/pr104529.C           |    1 +
 gcc/testsuite/g++.dg/tree-ssa/pr109849.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/pr20458.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/uninit-pr105937.C             |    1 +
 gcc/testsuite/g++.dg/vect/pr102421.cc              |    1 +
 gcc/testsuite/g++.dg/vect/pr105053.cc              |    1 +
 gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc       |    1 +
 gcc/testsuite/g++.dg/vect/pr64410.cc               |    1 +
 gcc/testsuite/g++.dg/vect/slp-pr87105.cc           |    1 +
 gcc/testsuite/g++.dg/vect/slp-pr98855.cc           |    1 +
 gcc/testsuite/g++.dg/vect/vect-novector-pragma.cc  |    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-reference14.C  |    1 +
 gcc/testsuite/g++.dg/warn/Wdangling-reference17.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 +
 gcc/testsuite/g++.dg/warn/Wparentheses-34.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/Wsystem-headers1a.C      |    1 +
 gcc/testsuite/g++.dg/warn/Wuninitialized-33.C      |    1 +
 .../g++.dg/warn/Wuninitialized-pr111123-1.C        |    1 +
 gcc/testsuite/g++.dg/warn/format1.C                |    1 +
 gcc/testsuite/g++.dg/warn/huge-val1.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++.abi/arraynew.C      |    1 +
 gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C       |    2 ++
 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/new3.C      |    2 ++
 gcc/testsuite/g++.old-deja/g++.brendan/ptolemy2.C  |    1 +
 gcc/testsuite/g++.old-deja/g++.eh/new1.C           |    1 +
 gcc/testsuite/g++.old-deja/g++.eh/new2.C           |    1 +
 gcc/testsuite/g++.old-deja/g++.jason/2371.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/template44.C  |    2 ++
 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/arm13.C         |    2 ++
 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/scope2.C        |    2 ++
 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++.law/weak.C          |    2 ++
 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/eh47.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/ns15.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/p658.C         |    1 +
 gcc/testsuite/g++.old-deja/g++.mike/p710.C         |    2 ++
 gcc/testsuite/g++.old-deja/g++.mike/p9706.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++.oliva/new1.C        |    2 ++
 gcc/testsuite/g++.old-deja/g++.other/defarg6.C     |    1 +
 gcc/testsuite/g++.old-deja/g++.other/delete8.C     |    2 ++
 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/g++.target/i386/avx-pr54700-1.C      |    1 +
 gcc/testsuite/g++.target/i386/avx-pr54700-2.C      |    1 +
 gcc/testsuite/g++.target/i386/avx2-pr54700-1.C     |    1 +
 gcc/testsuite/g++.target/i386/avx2-pr54700-2.C     |    1 +
 gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C |    1 +
 .../g++.target/i386/avx512vl-pr54700-1a.C          |    1 +
 .../g++.target/i386/avx512vl-pr54700-1b.C          |    1 +
 .../g++.target/i386/avx512vl-pr54700-2a.C          |    1 +
 .../g++.target/i386/avx512vl-pr54700-2b.C          |    1 +
 gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C |    1 +
 gcc/testsuite/g++.target/i386/mvc4.C               |    1 +
 gcc/testsuite/g++.target/i386/pr100885.C           |    1 +
 gcc/testsuite/g++.target/i386/pr102166.C           |    1 +
 gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C  |    1 +
 gcc/testsuite/g++.target/i386/pr105593.C           |    1 +
 gcc/testsuite/g++.target/i386/pr105638.C           |    1 +
 gcc/testsuite/g++.target/i386/pr110170.C           |    2 ++
 gcc/testsuite/g++.target/i386/pr112443.C           |    1 +
 gcc/testsuite/g++.target/i386/pr113560.C           |    1 +
 gcc/testsuite/g++.target/i386/pr80566-1.C          |    1 +
 gcc/testsuite/g++.target/i386/pr80566-2.C          |    1 +
 gcc/testsuite/g++.target/i386/pr88152.C            |    1 +
 gcc/testsuite/g++.target/i386/pr88998.C            |    1 +
 gcc/testsuite/g++.target/i386/pr94046-1.C          |    1 +
 gcc/testsuite/g++.target/i386/pr94046-2.C          |    1 +
 gcc/testsuite/g++.target/i386/sse4_1-pr54700-1.C   |    1 +
 gcc/testsuite/g++.target/i386/sse4_1-pr54700-2.C   |    1 +
 gcc/testsuite/lib/target-supports.exp              |   18 ++++++++++++++++++
 863 files changed, 1003 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 7c7094dc5a922..b8beb381ae910 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2808,6 +2808,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/analyzer/allocation-size-1.c b/gcc/testsuite/c-c++-common/analyzer/allocation-size-1.c
index 5b4e739278254..a9d375d2edc2b 100644
--- a/gcc/testsuite/c-c++-common/analyzer/allocation-size-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/allocation-size-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/allocation-size-2.c b/gcc/testsuite/c-c++-common/analyzer/allocation-size-2.c
index a9f92cf2d02ca..cee9208c8a8a9 100644
--- a/gcc/testsuite/c-c++-common/analyzer/allocation-size-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/allocation-size-2.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-fine-grained" }
+   { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
    -fanalyzer-fine-grained is currently required; see PR analyzer/107851.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/allocation-size-3.c b/gcc/testsuite/c-c++-common/analyzer/allocation-size-3.c
index 4e99e881dff7d..9d06d4b30d211 100644
--- a/gcc/testsuite/c-c++-common/analyzer/allocation-size-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/allocation-size-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-fine-grained" }
+   { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
    -fanalyzer-fine-grained is currently required; see PR analyzer/107851.  */
 
 /* { dg-additional-options -Wno-analyzer-out-of-bounds } */
diff --git a/gcc/testsuite/c-c++-common/analyzer/allocation-size-4.c b/gcc/testsuite/c-c++-common/analyzer/allocation-size-4.c
index 7d07ba67316cf..3dbf13e40123b 100644
--- a/gcc/testsuite/c-c++-common/analyzer/allocation-size-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/allocation-size-4.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-0.c b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-0.c
index acc41567f48d0..c1a3ca753e699 100644
--- a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-0.c
+++ b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-0.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=0" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-1.c b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-1.c
index 27b885dc95548..ac8df5f688ca5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=1" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-2.c b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-2.c
index d2dc522cc1aac..e03e3cdbe59f0 100644
--- a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-2.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-3.c b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-3.c
index 3661f1fd485b1..dd8226f51a7c7 100644
--- a/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/analyzer-verbosity-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=3" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/call-summaries-1.c b/gcc/testsuite/c-c++-common/analyzer/call-summaries-1.c
index a64b230cef32e..643a316429159 100644
--- a/gcc/testsuite/c-c++-common/analyzer/call-summaries-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/call-summaries-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-call-summaries" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c b/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c
index 15c4c2e8fccc3..6522c37e108bc 100644
--- a/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c
+++ b/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-call-summaries --param analyzer-min-snodes-for-call-summary=0" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 /* There need to be at least two calls to a function for the
    call-summarization code to be used.
diff --git a/gcc/testsuite/c-c++-common/analyzer/callbacks-1.c b/gcc/testsuite/c-c++-common/analyzer/callbacks-1.c
index 52c8fde540a7d..763027c714ae9 100644
--- a/gcc/testsuite/c-c++-common/analyzer/callbacks-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/callbacks-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 /* Reproducer for PR analyzer/97258: we should report the double-free
    inside a static callback if the callback escapes.  */
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/callbacks-2.c b/gcc/testsuite/c-c++-common/analyzer/callbacks-2.c
index 98915ee617bd2..772187311b768 100644
--- a/gcc/testsuite/c-c++-common/analyzer/callbacks-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/callbacks-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 /* Reproducer for PR analyzer/97258: we should report the double-free
    inside a static callback if the callback is accessible via a global
    initializer.  */
diff --git a/gcc/testsuite/c-c++-common/analyzer/capacity-1.c b/gcc/testsuite/c-c++-common/analyzer/capacity-1.c
index cfee1159826a5..76905a623f214 100644
--- a/gcc/testsuite/c-c++-common/analyzer/capacity-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/capacity-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target alloca } */
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include "../../gcc.dg/analyzer/analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/capacity-2.c b/gcc/testsuite/c-c++-common/analyzer/capacity-2.c
index fbdb61a991e03..7d2de4ed8ad6c 100644
--- a/gcc/testsuite/c-c++-common/analyzer/capacity-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/capacity-2.c
@@ -1,4 +1,5 @@ 
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include "analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/capacity-3.c b/gcc/testsuite/c-c++-common/analyzer/capacity-3.c
index c099ff5725d80..2fcf70791f4cb 100644
--- a/gcc/testsuite/c-c++-common/analyzer/capacity-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/capacity-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target alloca } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include "analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c b/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c
index b7389e2808371..9ff95d35d18d1 100644
--- a/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 struct ptr_wrapper
diff --git a/gcc/testsuite/c-c++-common/analyzer/data-model-14.c b/gcc/testsuite/c-c++-common/analyzer/data-model-14.c
index 1dbcb70112303..9400ae2fd7abb 100644
--- a/gcc/testsuite/c-c++-common/analyzer/data-model-14.c
+++ b/gcc/testsuite/c-c++-common/analyzer/data-model-14.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void *global_ptr;
diff --git a/gcc/testsuite/c-c++-common/analyzer/data-model-20.c b/gcc/testsuite/c-c++-common/analyzer/data-model-20.c
index 59f62853ad6a8..dd7996bd16058 100644
--- a/gcc/testsuite/c-c++-common/analyzer/data-model-20.c
+++ b/gcc/testsuite/c-c++-common/analyzer/data-model-20.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/data-model-5d.c b/gcc/testsuite/c-c++-common/analyzer/data-model-5d.c
index b4d77a939bc93..a86d5060c7a6e 100644
--- a/gcc/testsuite/c-c++-common/analyzer/data-model-5d.c
+++ b/gcc/testsuite/c-c++-common/analyzer/data-model-5d.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* A toy re-implementation of CPython's object model.  */
 
 #include <stddef.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/disabling.c b/gcc/testsuite/c-c++-common/analyzer/disabling.c
index a696d1e021e06..6f3a50e119601 100644
--- a/gcc/testsuite/c-c++-common/analyzer/disabling.c
+++ b/gcc/testsuite/c-c++-common/analyzer/disabling.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 /* Verify that we can override -fanalyzer with -fno-analyzer.  */
 /* { dg-additional-options "-fno-analyzer" } */
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/dump-state.c b/gcc/testsuite/c-c++-common/analyzer/dump-state.c
index 618a5a9d7810f..09490be0cc323 100644
--- a/gcc/testsuite/c-c++-common/analyzer/dump-state.c
+++ b/gcc/testsuite/c-c++-common/analyzer/dump-state.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Verify that __analyzer_dump_state works as expected.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/edges-2.c b/gcc/testsuite/c-c++-common/analyzer/edges-2.c
index 847a70883fb63..7e4543c24c30f 100644
--- a/gcc/testsuite/c-c++-common/analyzer/edges-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/edges-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 int foo ();
diff --git a/gcc/testsuite/c-c++-common/analyzer/first-field-2.c b/gcc/testsuite/c-c++-common/analyzer/first-field-2.c
index 8661e6e9efd03..52b9df23ae4e4 100644
--- a/gcc/testsuite/c-c++-common/analyzer/first-field-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/first-field-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* A toy re-implementation of CPython's object model.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/flex-with-call-summaries.c b/gcc/testsuite/c-c++-common/analyzer/flex-with-call-summaries.c
index cbb953ad06ace..b4124c963d184 100644
--- a/gcc/testsuite/c-c++-common/analyzer/flex-with-call-summaries.c
+++ b/gcc/testsuite/c-c++-common/analyzer/flex-with-call-summaries.c
@@ -7,6 +7,7 @@ 
 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
 /* { dg-additional-options "-Wno-analyzer-symbol-too-complex" } */
 /* { dg-additional-options "-D_POSIX_SOURCE" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 /* A lexical scanner generated by flex */
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c b/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c
index c6ecb25d25d59..092d784862197 100644
--- a/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c
+++ b/gcc/testsuite/c-c++-common/analyzer/flex-without-call-summaries.c
@@ -6,6 +6,8 @@ 
 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
 /* { dg-additional-options "-D_POSIX_SOURCE" } */
 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 
 /* A lexical scanner generated by flex */
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/flexible-array-member-1.c b/gcc/testsuite/c-c++-common/analyzer/flexible-array-member-1.c
index d794336198b82..72df154a85a67 100644
--- a/gcc/testsuite/c-c++-common/analyzer/flexible-array-member-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/flexible-array-member-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <string.h>
 #include "../../gcc.dg/analyzer/analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/function-ptr-2.c b/gcc/testsuite/c-c++-common/analyzer/function-ptr-2.c
index 0a1e845d6c55f..76f5bd0c24554 100644
--- a/gcc/testsuite/c-c++-common/analyzer/function-ptr-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/function-ptr-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "../../gcc.dg/analyzer/analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/function-ptr-3.c b/gcc/testsuite/c-c++-common/analyzer/function-ptr-3.c
index 348ee4a0cb3f4..62ba89ee3d96d 100644
--- a/gcc/testsuite/c-c++-common/analyzer/function-ptr-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/function-ptr-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 typedef void *(*alloc_func_t) (size_t);
diff --git a/gcc/testsuite/c-c++-common/analyzer/function-ptr-4.c b/gcc/testsuite/c-c++-common/analyzer/function-ptr-4.c
index 016351a83f6bf..1ba080d643341 100644
--- a/gcc/testsuite/c-c++-common/analyzer/function-ptr-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/function-ptr-4.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 /* Test to see if the analyzer detect and analyze calls via 
    function pointers or not.  */
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/gzio.c b/gcc/testsuite/c-c++-common/analyzer/gzio.c
index 54efa77d05617..43511704e7c32 100644
--- a/gcc/testsuite/c-c++-common/analyzer/gzio.c
+++ b/gcc/testsuite/c-c++-common/analyzer/gzio.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 typedef struct z_stream_s {
   unsigned char *next_out;
diff --git a/gcc/testsuite/c-c++-common/analyzer/imprecise-floating-point-1.c b/gcc/testsuite/c-c++-common/analyzer/imprecise-floating-point-1.c
index cbe26589db009..b093a3c4d2ab9 100644
--- a/gcc/testsuite/c-c++-common/analyzer/imprecise-floating-point-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/imprecise-floating-point-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target alloca } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/leak-2.c b/gcc/testsuite/c-c++-common/analyzer/leak-2.c
index d12850cdc6a54..3bba4132a3c30 100644
--- a/gcc/testsuite/c-c++-common/analyzer/leak-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/leak-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "../../gcc.dg/analyzer/analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/leak-3.c b/gcc/testsuite/c-c++-common/analyzer/leak-3.c
index d11cc03b36f0d..a386d887f3329 100644
--- a/gcc/testsuite/c-c++-common/analyzer/leak-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/leak-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 /* Reduced from Juliet 1.3's CWE415_Double_Free__malloc_free_char_67a.c
diff --git a/gcc/testsuite/c-c++-common/analyzer/leak-4.c b/gcc/testsuite/c-c++-common/analyzer/leak-4.c
index ba5f2d26f4b40..5ee3c310d5b67 100644
--- a/gcc/testsuite/c-c++-common/analyzer/leak-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/leak-4.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Various tests of memory leak detection.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c b/gcc/testsuite/c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c
index 1b657697ef407..e169cd44aa17d 100644
--- a/gcc/testsuite/c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c
+++ b/gcc/testsuite/c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 #include "../../gcc.dg/analyzer/analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/loop-3.c b/gcc/testsuite/c-c++-common/analyzer/loop-3.c
index 0bcf70746232f..a07f0f4ce01ce 100644
--- a/gcc/testsuite/c-c++-common/analyzer/loop-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/loop-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void test(int c)
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-3.c b/gcc/testsuite/c-c++-common/analyzer/malloc-3.c
index f4e647b25aa2c..becdafa7082c2 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 /* Don't complain about leaks due to exiting from "main".  */
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-5.c b/gcc/testsuite/c-c++-common/analyzer/malloc-5.c
index 3b2a4527ab587..af7aca8e307c4 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-5.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-5.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void test (void)
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-401-example.c b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-401-example.c
index cfb5e86260c1c..4caa5a001848e 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-401-example.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-401-example.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Example adapted from https://cwe.mitre.org/data/definitions/401.html
    which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation."
    and which has this on:
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-415-examples.c b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-415-examples.c
index 51d878a17c363..4fb2788cf7b27 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-415-examples.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-415-examples.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Example adapted from https://cwe.mitre.org/data/definitions/415.html
    which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation."
    and which has this on:
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-416-examples.c b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-416-examples.c
index 3f5e5e2603357..bf8878c4ec575 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-416-examples.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-416-examples.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Examples adapted from https://cwe.mitre.org/data/definitions/416.html
    which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation."
    and which has this on:
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-590-examples.c b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-590-examples.c
index 11ab017c12aea..f9d2da120907c 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-590-examples.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-CWE-590-examples.c
@@ -1,5 +1,6 @@ 
 /* { dg-additional-options "-Wno-free-nonheap-object" } */
 /* { dg-require-effective-target size32plus } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 /* Examples adapted from https://cwe.mitre.org/data/definitions/590.html
    which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation."
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-callbacks.c b/gcc/testsuite/c-c++-common/analyzer/malloc-callbacks.c
index ccd6c01194f30..0ba4f3824c621 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-callbacks.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-callbacks.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target alloca } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-dce.c b/gcc/testsuite/c-c++-common/analyzer/malloc-dce.c
index 1b4b8788b86b8..7f5ec67877f49 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-dce.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-dce.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-dedupe-1.c b/gcc/testsuite/c-c++-common/analyzer/malloc-dedupe-1.c
index 233ab485b5afb..8653c67b08b56 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-dedupe-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-dedupe-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 extern void foo (void);
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-in-loop.c b/gcc/testsuite/c-c++-common/analyzer/malloc-in-loop.c
index b10715770243c..e7179f09a1d1d 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-in-loop.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-in-loop.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "../../gcc.dg/analyzer/analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-1.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-1.c
index ad536ce5f02f0..ee6e0e01876cf 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void *
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-10.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-10.c
index f3a5be51ff10d..e3d4f6a3dee7e 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-10.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-10.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-11.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-11.c
index 60501034bc320..e1bd58471a0a5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-11.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-11.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-12.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-12.c
index 3813c9ae45ea8..6bdbcc47672fa 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-12.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-12.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void recursive_free (void *ptr)
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-13a.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-13a.c
index d74ef59c7cf35..0b5304ea6d050 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-13a.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-13a.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-verbosity=1" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-2.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-2.c
index 800dd63a031a0..f2496c30553c9 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-2.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-verbosity=1" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-3.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-3.c
index 3dcfae8f0a296..7ff42b814400f 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void *
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-4.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-4.c
index bd03d607872e1..535979c7e0a69 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-4.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 static void calls_free(int *q)
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-5.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-5.c
index ca8e6a511f5ef..5c1cc1a0ef424 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-5.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-5.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 static int *calls_malloc(void)
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-6.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-6.c
index 62f8b55c3643b..ad22a365fee06 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-6.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-6.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void *
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-7.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-7.c
index 1fe70ddc8b2c9..b80ae03598896 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-7.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-7.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 /**************************************************************************/
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-9.c b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-9.c
index a0c78fd6c4ec7..455f6ec82c496 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-9.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-ipa-9.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-path-format=none -fanalyzer-verbosity=1" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-macro-inline-events.c b/gcc/testsuite/c-c++-common/analyzer/malloc-macro-inline-events.c
index 8620bc919a5b6..8e71c4144cd0d 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-macro-inline-events.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-macro-inline-events.c
@@ -1,6 +1,7 @@ 
 /* Test path-printing in the face of macros.  */
 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include "malloc-macro.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-macro-separate-events.c b/gcc/testsuite/c-c++-common/analyzer/malloc-macro-separate-events.c
index 647b29c3aa40c..2ab169e7e03ed 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-macro-separate-events.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-macro-separate-events.c
@@ -1,6 +1,7 @@ 
 /* Test path-printing in the face of macros.  */
 
 /* { dg-additional-options "-fdiagnostics-path-format=separate-events" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include "malloc-macro.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-many-paths-3.c b/gcc/testsuite/c-c++-common/analyzer/malloc-many-paths-3.c
index e5d27a4a33a69..6ee30f3c86aba 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-many-paths-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-many-paths-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 extern int foo (void);
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-meaning-1.c b/gcc/testsuite/c-c++-common/analyzer/malloc-meaning-1.c
index 4964e25fe1086..a0bc30ad4f236 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-meaning-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-meaning-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-verbose-state-changes" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-1.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-1.c
index 0436928238c2c..2c09c11f050c7 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Verify that we emit sane paths for state machine errors.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-2.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-2.c
index 27098da1996db..af57085243a97 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 /* Verify that we emit sane paths for state machine errors.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-3.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-3.c
index 8f9e4cff6e2b2..22fabbd1eafa0 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Verify that we emit sane paths for state machine errors.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-4.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-4.c
index 7b7803eac45ad..6976fce7ec665 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-4.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 /* Verify that we emit sane paths for state machine errors.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-5.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-5.c
index ca8d22be7b0d2..f03f97845c389 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-5.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-5.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdio.h>
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-6.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-6.c
index 1df6964544e27..dfed45df15d21 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-6.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-6.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void test (void *ptr)
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-7.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-7.c
index f6b99e35a43ea..766bbe7d99ad8 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-7.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-7.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 extern int foo (void);
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-8.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-8.c
index 4988f53b94cbc..ca48834c855cf 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-8.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-8.c
@@ -1,5 +1,6 @@ 
 /* { dg-additional-options "-fanalyzer-transitivity" } */
 /* { dg-require-effective-target alloca } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stddef.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-9-noexcept.c b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-9-noexcept.c
index 57d25f436a087..fc453b124957b 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-paths-9-noexcept.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-paths-9-noexcept.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fno-exceptions" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-sarif-1.c b/gcc/testsuite/c-c++-common/analyzer/malloc-sarif-1.c
index 19ac89f2b67cb..cee6788c266b5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-sarif-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-sarif-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-additional-options " -fno-diagnostics-json-formatting -fdiagnostics-format=sarif-file" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1a.c b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1a.c
index bf77862e67c47..4e408339d67d8 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1a.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1a.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fno-analyzer-call-summaries -fanalyzer-transitivity" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include "analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1b.c b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1b.c
index a30b8c0e08060..f4d63115929e7 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1b.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-1b.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-call-summaries" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include "analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-2.c b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-2.c
index 9001fe66cd78a..36ec5109ac7de 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-3.c b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-3.c
index 0196389d3a59a..70b3edd38f5b5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/malloc-vs-local-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-1.c b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-1.c
index 868b8ee9b410c..16b2271bb93ef 100644
--- a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdint.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-2.c b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-2.c
index e69614612fdb8..0e1aba59fef76 100644
--- a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-3.c b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-3.c
index 43df9564a76a0..e75ce1214bd25 100644
--- a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-3.c
@@ -2,6 +2,7 @@ 
    { dg-require-effective-target lp64 } */
 
 /* { dg-additional-options "-fdiagnostics-text-art-charset=unicode" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-8.c b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-8.c
index 81cd4ff3c4b18..c8ff2fd1e64c8 100644
--- a/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-8.c
+++ b/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-8.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-text-art-charset=unicode" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include <stdint.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/paths-3.c b/gcc/testsuite/c-c++-common/analyzer/paths-3.c
index b5ab810e5363d..1a4a81350c199 100644
--- a/gcc/testsuite/c-c++-common/analyzer/paths-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/paths-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fanalyzer-transitivity" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include "analyzer-decls.h"
diff --git a/gcc/testsuite/c-c++-common/analyzer/paths-6.c b/gcc/testsuite/c-c++-common/analyzer/paths-6.c
index ef1a4e6c04d1c..766db4c40a052 100644
--- a/gcc/testsuite/c-c++-common/analyzer/paths-6.c
+++ b/gcc/testsuite/c-c++-common/analyzer/paths-6.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/paths-7.c b/gcc/testsuite/c-c++-common/analyzer/paths-7.c
index 8caaee8a3fd09..2743de5cd8c06 100644
--- a/gcc/testsuite/c-c++-common/analyzer/paths-7.c
+++ b/gcc/testsuite/c-c++-common/analyzer/paths-7.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr103526.c b/gcc/testsuite/c-c++-common/analyzer/pr103526.c
index 0388fc1df9994..ce8fa22a7845b 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr103526.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr103526.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr106539.c b/gcc/testsuite/c-c++-common/analyzer/pr106539.c
index 8745c1de09aea..1f49f9169eb6d 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr106539.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr106539.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void *test (void)
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr93290.c b/gcc/testsuite/c-c++-common/analyzer/pr93290.c
index fa35629d955b0..4fcc4cbfaed18 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr93290.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr93290.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } } */
+
 #include <math.h>
 
 int test_1 (void)
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr94399.c b/gcc/testsuite/c-c++-common/analyzer/pr94399.c
index e897c04a007ef..70270c37a27d5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr94399.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr94399.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 #define _cleanup_(f) __attribute__((cleanup(f)))
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr94851-1.c b/gcc/testsuite/c-c++-common/analyzer/pr94851-1.c
index 7407efa21e76d..dc2bc3a7806a5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr94851-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr94851-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* { dg-additional-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr94851-2.c b/gcc/testsuite/c-c++-common/analyzer/pr94851-2.c
index 62176bdaee89b..af838de9355d0 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr94851-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr94851-2.c
@@ -2,6 +2,7 @@ 
    an unknown function (PR analyzer/98575).  */
 
 /* { dg-additional-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr94851-4.c b/gcc/testsuite/c-c++-common/analyzer/pr94851-4.c
index a5130c59cb007..d05d45876c9c5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr94851-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr94851-4.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-O2 -Wno-analyzer-symbol-too-complex" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr97608.c b/gcc/testsuite/c-c++-common/analyzer/pr97608.c
index a2bc1301097c6..ddfa0091d86c4 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr97608.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr97608.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void *f (void)
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr98918.c b/gcc/testsuite/c-c++-common/analyzer/pr98918.c
index c3bbce3e6ec18..eddc4e30684ee 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr98918.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr98918.c
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-Wno-analyzer-symbol-too-complex" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr99716-2.c b/gcc/testsuite/c-c++-common/analyzer/pr99716-2.c
index adc9819643ae4..ef7cc5fb49454 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr99716-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr99716-2.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib rand" { ! hostedlib } } */
+
 /* Reduced from
    https://github.com/libguestfs/libguestfs/blob/e0a11061035d47b118c95706240bcc17fd576edc/tests/mount-local/test-parallel-mount-local.c#L299-L335
    which is GPLv2 or later.  */
diff --git a/gcc/testsuite/c-c++-common/analyzer/pr99716-3.c b/gcc/testsuite/c-c++-common/analyzer/pr99716-3.c
index 77d450ea3be0d..414d57e3a728f 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pr99716-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pr99716-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 extern void foo (void *);
diff --git a/gcc/testsuite/c-c++-common/analyzer/pragma-1.c b/gcc/testsuite/c-c++-common/analyzer/pragma-1.c
index 2e533489405b5..821266a3c3ba5 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pragma-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pragma-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
+
 /* Verify that we can disable analyzer warnings via pragmas.  */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/pragma-2.c b/gcc/testsuite/c-c++-common/analyzer/pragma-2.c
index 2453223d9392a..bd96a2538540f 100644
--- a/gcc/testsuite/c-c++-common/analyzer/pragma-2.c
+++ b/gcc/testsuite/c-c++-common/analyzer/pragma-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
 /* Verify that we can disable -Wanalyzer-too-complex via pragmas.  */
 /* { dg-additional-options "-Wanalyzer-too-complex -Werror=analyzer-too-complex -fno-analyzer-state-merge -g" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/sarif-path-role.c b/gcc/testsuite/c-c++-common/analyzer/sarif-path-role.c
index d0f6cefcf4d0a..c5592776bebb1 100644
--- a/gcc/testsuite/c-c++-common/analyzer/sarif-path-role.c
+++ b/gcc/testsuite/c-c++-common/analyzer/sarif-path-role.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-additional-options " -fno-diagnostics-json-formatting -fdiagnostics-format=sarif-file" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/analyzer/scope-1.c b/gcc/testsuite/c-c++-common/analyzer/scope-1.c
index 09e62d46df355..7e53a1914c7e6 100644
--- a/gcc/testsuite/c-c++-common/analyzer/scope-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/scope-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 int test_1 (void)
diff --git a/gcc/testsuite/c-c++-common/analyzer/strndup-1.c b/gcc/testsuite/c-c++-common/analyzer/strndup-1.c
index 577ece0cfbaaa..3f90afe2ebb61 100644
--- a/gcc/testsuite/c-c++-common/analyzer/strndup-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/strndup-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* hppa*-*-hpux* *-*-mingw* *-*-vxworks* } } */
 /* { dg-additional-options "-D_POSIX_C_SOURCE=200809L" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <string.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/taint-alloc-3.c b/gcc/testsuite/c-c++-common/analyzer/taint-alloc-3.c
index ce6a3271d2ad2..34bae28ac6aa1 100644
--- a/gcc/testsuite/c-c++-common/analyzer/taint-alloc-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/taint-alloc-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include "analyzer-decls.h"
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/taint-realloc.c b/gcc/testsuite/c-c++-common/analyzer/taint-realloc.c
index aeefb7da2c12e..d5ccb28ddd280 100644
--- a/gcc/testsuite/c-c++-common/analyzer/taint-realloc.c
+++ b/gcc/testsuite/c-c++-common/analyzer/taint-realloc.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib realloc" { ! hostedlib } } */
+
 #include "analyzer-decls.h"
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/analyzer/use-after-free-3.c b/gcc/testsuite/c-c++-common/analyzer/use-after-free-3.c
index b19fd3de49f41..d8eeb17411386 100644
--- a/gcc/testsuite/c-c++-common/analyzer/use-after-free-3.c
+++ b/gcc/testsuite/c-c++-common/analyzer/use-after-free-3.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 void test_1 (int x, int y, int *out)
diff --git a/gcc/testsuite/c-c++-common/analyzer/zlib-4.c b/gcc/testsuite/c-c++-common/analyzer/zlib-4.c
index ae2f6c9f8ad12..32d5991b42187 100644
--- a/gcc/testsuite/c-c++-common/analyzer/zlib-4.c
+++ b/gcc/testsuite/c-c++-common/analyzer/zlib-4.c
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for stdlib calloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-counter-vars-function-scope.c b/gcc/testsuite/c-c++-common/goacc/kernels-counter-vars-function-scope.c
index bce17a1011c35..dedf8481b0745 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-counter-vars-function-scope.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-counter-vars-function-scope.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-2.c
index 456a95451fa7d..9d3d6b341677c 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c
index ef0c481dea096..24e5d02f7fa14 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-3.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-2.c
index a64007815c190..a9bae836567ff 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit-2.c
index d46bba8ec3a00..aeeeb51d5c0e4 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit-2.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit.c
index 6698980a86f3d..843c5a7105f58 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-enter-exit.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-update.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-update.c
index 9c6997f86b0a7..57e440f4e7012 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-update.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data-update.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data.c
index 0ef576521b095..896b4565ac6e4 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-data.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-data.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c
index cf9f1ee6b28a4..6b89b3b88b839 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-g.c
@@ -5,6 +5,7 @@ 
 /*TODO PR100400 { dg-additional-options -fcompare-debug } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include "kernels-loop.c"
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-mod-not-zero.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-mod-not-zero.c
index eea9a735e8b54..f2787d0bf5238 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-mod-not-zero.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-mod-not-zero.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-n.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop-n.c
index a63ed8ab1fd81..caa05720afdba 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop-n.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop-n.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop.c b/gcc/testsuite/c-c++-common/goacc/kernels-loop.c
index 2602081f2c661..75cbeed383bf1 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-loop.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-loop.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-one-counter-var.c b/gcc/testsuite/c-c++-common/goacc/kernels-one-counter-var.c
index 0d9c875f3d93b..67c19ec605528 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-one-counter-var.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-one-counter-var.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c b/gcc/testsuite/c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c
index 1dcd32fb8dc10..b2ba14d47fd1a 100644
--- a/gcc/testsuite/c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c
@@ -1,6 +1,7 @@ 
 /* { dg-additional-options "-O2" } */
 /* { dg-additional-options "-fdump-tree-parloops1-all" } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/gomp/pr103642.c b/gcc/testsuite/c-c++-common/gomp/pr103642.c
index bbd0896841f66..bc6d7ac18de31 100644
--- a/gcc/testsuite/c-c++-common/gomp/pr103642.c
+++ b/gcc/testsuite/c-c++-common/gomp/pr103642.c
@@ -1,5 +1,6 @@ 
 /* PR middle-end/103642 */
 /* { dg-do compile } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c b/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c
index 222272df5b1ed..b3df466a7747d 100644
--- a/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c
+++ b/gcc/testsuite/c-c++-common/gomp/target-implicit-map-2.c
@@ -1,5 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-gimple" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
+
 #include <stdlib.h>
 
 #define N 10
diff --git a/gcc/testsuite/c-c++-common/pr36513-2.c b/gcc/testsuite/c-c++-common/pr36513-2.c
index d81c81dd4da08..ca93f41430465 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/c-c++-common/simulate-thread/bitfields-4.c b/gcc/testsuite/c-c++-common/simulate-thread/bitfields-4.c
index 84aad5e9e216f..6ee91aa3bc472 100644
--- a/gcc/testsuite/c-c++-common/simulate-thread/bitfields-4.c
+++ b/gcc/testsuite/c-c++-common/simulate-thread/bitfields-4.c
@@ -1,6 +1,7 @@ 
 /* { dg-do link } */
 /* { dg-options "-fno-allow-store-data-races" } */
 /* { dg-final { simulate-thread } } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib calloc" { ! hostedlib } } */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/c-c++-common/tm/malloc.c b/gcc/testsuite/c-c++-common/tm/malloc.c
index 4312765f750d7..f8ab68954a9b9 100644
--- a/gcc/testsuite/c-c++-common/tm/malloc.c
+++ b/gcc/testsuite/c-c++-common/tm/malloc.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fgnu-tm -fdump-tree-tmmark" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle36.C b/gcc/testsuite/g++.dg/abi/mangle36.C
index 1acfc879b96a9..d0f2b37dfb04f 100644
--- a/gcc/testsuite/g++.dg/abi/mangle36.C
+++ b/gcc/testsuite/g++.dg/abi/mangle36.C
@@ -1,6 +1,7 @@ 
 // PR c++/41959
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-options "-mavx -fabi-version=4 -fabi-compat-version=4" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 // { dg-final { scan-assembler "_Z1fDv4_f" } }
 // { dg-final { scan-assembler "_Z1fDv8_f" } }
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle40.C b/gcc/testsuite/g++.dg/abi/mangle40.C
index 898565ac5720a..98a1ff08a4ea2 100644
--- a/gcc/testsuite/g++.dg/abi/mangle40.C
+++ b/gcc/testsuite/g++.dg/abi/mangle40.C
@@ -3,6 +3,7 @@ 
 // { dg-require-weak "" }
 // { dg-require-alias "" }
 // { dg-options "-mavx -Wabi -fabi-version=2 -fabi-compat-version=0" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z1fIDv4_fEvT_" } }
 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z1fIU8__vectorfEvT_" } }
 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_ZN1AIDv4_fE1tE" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle41.C b/gcc/testsuite/g++.dg/abi/mangle41.C
index 9da72f11feb69..d11f4541f99cc 100644
--- a/gcc/testsuite/g++.dg/abi/mangle41.C
+++ b/gcc/testsuite/g++.dg/abi/mangle41.C
@@ -1,6 +1,7 @@ 
 // PR c++/41959
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-options "-mavx -fabi-version=2" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <x86intrin.h>
 void f(__m128) { }	// { dg-message "previous mangling" }
diff --git a/gcc/testsuite/g++.dg/analyzer/cstdlib.C b/gcc/testsuite/g++.dg/analyzer/cstdlib.C
index ec6327bf884d6..072ac456405da 100644
--- a/gcc/testsuite/g++.dg/analyzer/cstdlib.C
+++ b/gcc/testsuite/g++.dg/analyzer/cstdlib.C
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib free" { ! hostedlib } } */
+
 #include <cstdlib>
 
 void test_1 (void *ptr)
diff --git a/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C b/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C
index 26f047d547158..483cefd6ec31d 100644
--- a/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C
+++ b/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C
@@ -1,4 +1,5 @@ 
 /* { dg-skip-if "no shared_ptr in C++98" { c++98_only }  } */
+/* { dg-skip-if "requires hosted libstdc++ for memory shared_ptr" { ! hostedlib } } */
 
 #include <memory>
 
diff --git a/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C b/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C
index fd0df31805162..10d220fa94042 100644
--- a/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C
+++ b/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C
@@ -1,5 +1,6 @@ 
 /* { dg-additional-options "-fno-analyzer-show-events-in-system-headers" } */
 /* { dg-skip-if "no shared_ptr in C++98" { c++98_only }  } */
+/* { dg-skip-if "requires hosted libstdc++ for memory shared_ptr" { ! hostedlib } } */
 
 #include <memory>
 
diff --git a/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C b/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C
index aa964f93563a6..cc177e3d0bb2e 100644
--- a/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C
+++ b/gcc/testsuite/g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C
@@ -1,5 +1,6 @@ 
 /* { dg-additional-options "-fanalyzer-show-events-in-system-headers" } */
 /* { dg-skip-if "no shared_ptr in C++98" { c++98_only }  } */
+/* { dg-skip-if "requires hosted libstdc++ for memory shared_ptr" { ! hostedlib } } */
 
 #include <memory>
 
diff --git a/gcc/testsuite/g++.dg/analyzer/malloc.C b/gcc/testsuite/g++.dg/analyzer/malloc.C
index 76baab982229c..d4ef831fe623a 100644
--- a/gcc/testsuite/g++.dg/analyzer/malloc.C
+++ b/gcc/testsuite/g++.dg/analyzer/malloc.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile }
+/* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/g++.dg/analyzer/new-vs-malloc.C b/gcc/testsuite/g++.dg/analyzer/new-vs-malloc.C
index cb0b32424ca94..943ffe03cbfe4 100644
--- a/gcc/testsuite/g++.dg/analyzer/new-vs-malloc.C
+++ b/gcc/testsuite/g++.dg/analyzer/new-vs-malloc.C
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib free" { ! hostedlib } } */
+
 #include <cstdlib>
 
 struct s {};
diff --git a/gcc/testsuite/g++.dg/analyzer/placement-new-size.C b/gcc/testsuite/g++.dg/analyzer/placement-new-size.C
index f6c7bd4de5fd2..6744ad7d27f6c 100644
--- a/gcc/testsuite/g++.dg/analyzer/placement-new-size.C
+++ b/gcc/testsuite/g++.dg/analyzer/placement-new-size.C
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-Wno-placement-new -Wno-analyzer-use-of-uninitialized-value" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <new>
 #include <stdlib.h>
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/analyzer/vfunc-3.C b/gcc/testsuite/g++.dg/analyzer/vfunc-3.C
index 03d3cdc73bee3..aaaf37603cf22 100644
--- a/gcc/testsuite/g++.dg/analyzer/vfunc-3.C
+++ b/gcc/testsuite/g++.dg/analyzer/vfunc-3.C
@@ -1,3 +1,5 @@ 
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
+
 #include <cstdlib>
 
 struct A
diff --git a/gcc/testsuite/g++.dg/analyzer/vfunc-5.C b/gcc/testsuite/g++.dg/analyzer/vfunc-5.C
index 2af84657f679b..89e0c936ea51d 100644
--- a/gcc/testsuite/g++.dg/analyzer/vfunc-5.C
+++ b/gcc/testsuite/g++.dg/analyzer/vfunc-5.C
@@ -1,4 +1,5 @@ 
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-checker=malloc -fdiagnostics-show-caret" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 /* { dg-enable-nn-line-numbers "" } */
 
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C
index 4b547b5d994e0..2543317f6b244 100644
--- a/gcc/testsuite/g++.dg/cdce3.C
+++ b/gcc/testsuite/g++.dg/cdce3.C
@@ -4,9 +4,9 @@ 
 /* { dg-additional-options "-DLARGE_LONG_DOUBLE" { target large_long_double } } */
 /* { dg-additional-options "-DGNU_EXTENSION" { target pow10 } } */
 /* { dg-add-options ieee } */
-/* { dg-final { scan-tree-dump  "cdce3.C:91: .* function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */
+/* { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } } */
 /* { dg-final { scan-tree-dump  "cdce3.C:92: .* function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */
-/* { dg-final { scan-tree-dump  "cdce3.C:94: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump  "cdce3.C:93: .* function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */
 /* { dg-final { scan-tree-dump  "cdce3.C:95: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
 /* { dg-final { scan-tree-dump  "cdce3.C:96: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
 /* { dg-final { scan-tree-dump  "cdce3.C:97: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
@@ -20,6 +20,7 @@ 
 /* { dg-final { scan-tree-dump  "cdce3.C:105: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
 /* { dg-final { scan-tree-dump  "cdce3.C:106: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
 /* { dg-final { scan-tree-dump  "cdce3.C:107: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump  "cdce3.C:108: .* function call is shrink-wrapped into error conditions\." "cdce" } } */
 
 #include <stdlib.h>
 #include <math.h>
diff --git a/gcc/testsuite/g++.dg/concepts/expression.C b/gcc/testsuite/g++.dg/concepts/expression.C
index 90ee7cecf8573..08d84b4bf589a 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 } }
 // { dg-options "-fconcepts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <iostream>
diff --git a/gcc/testsuite/g++.dg/concepts/fn3.C b/gcc/testsuite/g++.dg/concepts/fn3.C
index 546fa7eb85f5c..f8a992cf66201 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 } }
 // { dg-options "-fconcepts" }
+// { 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 63c3b5a79c6da..7f191e8edf3f7 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 } }
 // { dg-options "-fconcepts" }
+// { 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 9af1794b49eb0..42a53028cdf8b 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 } }
 // { dg-options "-fconcepts" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cassert>
 #include <type_traits>
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-access1.C b/gcc/testsuite/g++.dg/contracts/contracts-access1.C
index fdad7b1763c0d..7f6759e542150 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-access1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-access1.C
@@ -107,6 +107,7 @@  int main()
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function Base::b at .*.C:11: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function Base::b at .*.C:12: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function Base::b at .*.C:13: .*(\n|\r\n|\r)" }
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..eb4b54dee4bcc 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-config1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-config1.C
@@ -24,6 +24,7 @@  int main(int, char **)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output {contract violation in function main at .*:14: false(\n|\r\n|\r)} }
 // { dg-output {\[continue:on\](\n|\r\n|\r)} }
 // { dg-output {contract violation in function main at .*:15: false(\n|\r\n|\r)} }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C b/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C
index 9d0233ba9d7e4..f37d3d390ff63 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-constexpr1.C
@@ -63,6 +63,7 @@  int main(int, char **) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function ffun at .*.C:14: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function ffun at .*.C:15: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function ftfun<int> at .*.C:38: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C b/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C
index e67ba36a93e30..9920b5ccb0993 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-deduced2.C
@@ -71,6 +71,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function g0 at .*.C:5: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function g0 at .*.C:5: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function g1 at .*.C:12: .*(\n|\r\n|\r)" }
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..33ef2dd8bc187 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-friend1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-friend1.C
@@ -33,6 +33,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function fn0 at .*.C:6: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function fn2 at .*.C:19: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function X::fns0 at .*.C:9: .*(\n|\r\n|\r)" }
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..b2364e4db7de9 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-multiline1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-multiline1.C
@@ -16,4 +16,5 @@  int main(int, char **)
   ]];
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function main at .*.C:8: x < 10 && y > 123.*(\n|\r\n|\r)" }
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-post7.C b/gcc/testsuite/g++.dg/contracts/contracts-post7.C
index 1c33181b5e60d..5830c5ead1057 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-post7.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-post7.C
@@ -1,5 +1,6 @@ 
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts" }
+/* { dg-skip-if "requires hosted libstdc++ for cwchar" { ! hostedlib } } */
 
 #include <experimental/contract>
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre10.C b/gcc/testsuite/g++.dg/contracts/contracts-pre10.C
index fe855661b97b6..2b4acdf2bac9e 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre10.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre10.C
@@ -140,6 +140,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output {=================================(\n|\r\n|\r)} }
 // { dg-output {contract violation in function M::f<int> at .*:7: a > 0(\n|\r\n|\r)} }
 // { dg-output {\[continue:on\](\n|\r\n|\r)} }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre2.C b/gcc/testsuite/g++.dg/contracts/contracts-pre2.C
index d63d0712ff91b..fc78c33b8c3a6 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre2.C
@@ -174,6 +174,7 @@  namespace nonnullary
   }
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function nullary::fun at .*.C:12: .*(\n|\r\n|\r)" }
 // { dg-output "fun::x: 10(\n|\r\n|\r)" }
 // { dg-output "contract violation in function nullary::fun2 at .*.C:18: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C b/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C
index f4319bf1bff4e..461fb6fff9325 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre2a2.C
@@ -16,6 +16,7 @@  int main()
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function f at .*\\.C:6: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function f at .*\\.C:9: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function f at .*\\.C:7: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre3.C b/gcc/testsuite/g++.dg/contracts/contracts-pre3.C
index 70df31864f984..ff312f988fc60 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre3.C
@@ -403,6 +403,7 @@  member::S member::T1::funend(int m, double n)
   return s;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function member::T1::vfun at .*.C:37:  .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function member::T1::vfun at .*.C:38:  .*(\n|\r\n|\r)" }
 // { dg-output "vfun::x: 10(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre4.C b/gcc/testsuite/g++.dg/contracts/contracts-pre4.C
index ec26c02bff3d5..f658123aaa5ec 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre4.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre4.C
@@ -77,6 +77,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function Base::f at .*.C:7: .*(\n|\r\n|\r)" }
 // { dg-output "Base: 0(\n|\r\n|\r)" }
 // { dg-output "contract violation in function Base::f at .*.C:7: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre5.C b/gcc/testsuite/g++.dg/contracts/contracts-pre5.C
index 5030cec3c3cd7..767510150269d 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre5.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre5.C
@@ -56,6 +56,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function body<int> at .*.C:8: .*(\n|\r\n|\r)" }
 // { dg-output "-2(\n|\r\n|\r)" }
 // { dg-output "contract violation in function body<double> at .*.C:8: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre7.C b/gcc/testsuite/g++.dg/contracts/contracts-pre7.C
index 715a2c692cb0b..567444880bc13 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre7.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre7.C
@@ -108,6 +108,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function ns0::f<int> at .*.C:13: .*(\n|\r\n|\r)" }
 // { dg-output "1(\n|\r\n|\r)" }
 // { dg-output "contract violation in function ns0::ns1::f<int> at .*.C:28: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-pre9.C b/gcc/testsuite/g++.dg/contracts/contracts-pre9.C
index 4613be4e94713..3a509bc26f5de 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-pre9.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-pre9.C
@@ -108,6 +108,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function S<int>::f at .*.C:14: .*(\n|\r\n|\r)" }
 // { dg-output "s_int.f.-10.: 10(\n|\r\n|\r)" }
 // { dg-output "contract violation in function S<int>::g at .*.C:10: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C
index ef6b1236ded65..1cf9293ecf025 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl3.C
@@ -160,6 +160,7 @@  namespace nondefining
   }
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function defining::T1::vfun at .*.C:25: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function defining::T1::vfun at .*.C:26: .*(\n|\r\n|\r)" }
 // { dg-output "vfun::x: 10(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C
index e0a0c696f73cb..5f36159c7188b 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl4.C
@@ -33,6 +33,7 @@  int main(int, char **)
   printf("=====\n");
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function f at .*.C:10: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function f at .*.C:11: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function f at .*.C:12: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C
index 131f039e406ea..f8eb084b57fdd 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl6.C
@@ -160,6 +160,7 @@  namespace nondefining
   }
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function defining::T1::vfun at .*.C:25: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function defining::T1::vfun at .*.C:26: .*(\n|\r\n|\r)" }
 // { dg-output "vfun::x: 10(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C b/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C
index b7999b4bd7bb7..4ac76baf9d348 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-redecl7.C
@@ -77,6 +77,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function S::now at .*.C:9: .*(\n|\r\n|\r)" }
 // { dg-output "S::now: a: -10, t->pri: -10(\n|\r\n|\r)" }
 // { dg-output "contract violation in function now at .*.C:15: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C
index 1460b93479ebc..8f3733f4281a1 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec1.C
@@ -94,6 +94,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function body<int> at .*.C:8: .*(\n|\r\n|\r)" }
 // { dg-output "-2(\n|\r\n|\r)" }
 // { dg-output "contract violation in function body<double> at .*.C:16: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C
index fd3a25bd05146..5669a4ae4fde5 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C
@@ -304,6 +304,7 @@  int main(int, char**)
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output {contract violation in function body<int> at .*:9: a > 0(\n|\r\n|\r)} }
 // { dg-output {\[continue:on\](\n|\r\n|\r)} }
 // { dg-output {-2(\n|\r\n|\r)} }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C
index 090c1349f98d6..4b293de697627 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec3.C
@@ -32,6 +32,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output {G5 full double double, f gen R(\n|\r\n|\r)} }
 // { dg-output {G5 full double double, f gen R(\n|\r\n|\r)} }
 // { dg-output {contract violation in function G5<int, double>::f<int> at .*:10: t > 0(\n|\r\n|\r)} }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts10.C b/gcc/testsuite/g++.dg/contracts/contracts10.C
index 585af9918df4a..7e371c302672e 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts10.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts10.C
@@ -62,6 +62,7 @@  int main()
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function main at .*.C:47: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function main at .*.C:48: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function main at .*.C:49: .*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts14.C b/gcc/testsuite/g++.dg/contracts/contracts14.C
index d9156d6875dd2..6154953ffdbe0 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts14.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts14.C
@@ -48,6 +48,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // { dg-output "custom std::handle_contract_violation called: 30 .*/contracts14.C(\n|\r\n|\r)" }
 // { dg-output "synth caught direct: -30(\n|\r\n|\r)" }
 // { dg-output "custom std::handle_contract_violation called: 18 .*/contracts14.C(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts15.C b/gcc/testsuite/g++.dg/contracts/contracts15.C
index ef52a0e67f036..d538bd4a7edfe 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts15.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts15.C
@@ -48,6 +48,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // { dg-output "custom std::handle_contract_violation called: 30 .*/contracts15.C(\n|\r\n|\r)" }
 // { dg-output "synth caught direct: -30(\n|\r\n|\r)" }
 // { dg-output "custom std::handle_contract_violation called: 18 .*/contracts15.C(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/contracts/contracts16.C b/gcc/testsuite/g++.dg/contracts/contracts16.C
index 5d58ab8eaa15c..2770401738309 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts16.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts16.C
@@ -29,6 +29,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // { dg-output "custom std::handle_contract_violation called: 18 .*/contracts16.C(\n|\r\n|\r)" }
 // { dg-output "synth caught indirect: -18(\n|\r\n|\r)" }
 
diff --git a/gcc/testsuite/g++.dg/contracts/contracts17.C b/gcc/testsuite/g++.dg/contracts/contracts17.C
index f2db43346e4e3..2a8f65a9979ea 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts17.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts17.C
@@ -30,6 +30,7 @@  int main(int, char**) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 // { dg-output "custom std::handle_contract_violation called: 19 .*/contracts17.C(\n|\r\n|\r)" }
 // { dg-shouldfail "throwing in noexcept" }
 
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..1e39c2427729f 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts19.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts19.C
@@ -14,6 +14,7 @@  int main()
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function main at .*.C:11: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function main at .*.C:12: .*(\n|\r\n|\r)" }
 
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..2d46ce59603c7 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts25.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts25.C
@@ -50,6 +50,7 @@  int main(int, char **) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function ffun at .*.C:12: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function ftfun<int> at .*.C:30: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function explicitfn at .*.C:36: .*(\n|\r\n|\r)" }
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..d75640fbdcf54 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts35.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts35.C
@@ -32,6 +32,7 @@  int main(int, char **) {
   return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
 // { dg-output "contract violation in function S::S<int> at .*.C:8: .*(\n|\r\n|\r)" }
 // { dg-output "contract violation in function S::S<int> at .*.C:8: .*(\n|\r\n|\r)" }
 // { dg-output "S::S.T.: -1(\n|\r\n|\r)" }
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 58b60aca32057..112af6c1d73b0 100644
--- a/gcc/testsuite/g++.dg/contracts/contracts9.C
+++ b/gcc/testsuite/g++.dg/contracts/contracts9.C
@@ -35,6 +35,7 @@  int main()
   // return 0;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output {contract violation in function fun1<int> at .*:12: \(long long\)b > 0(\n|\r\n|\r)} }
 // { dg-output {\[continue:on\](\n|\r\n|\r)} }
 // { dg-output {contract violation in function fun1<double> at .*:11: a > 0(\n|\r\n|\r)} }
diff --git a/gcc/testsuite/g++.dg/contracts/pr110159.C b/gcc/testsuite/g++.dg/contracts/pr110159.C
index 614b466b1a39f..3cf5967cfd6f0 100644
--- a/gcc/testsuite/g++.dg/contracts/pr110159.C
+++ b/gcc/testsuite/g++.dg/contracts/pr110159.C
@@ -1,6 +1,7 @@ 
 // check that contracts can be handled even when exceptions are disabled
 // { dg-do run }
 // { dg-options "-std=c++2a -fcontracts -fno-exceptions " }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 // { dg-output "contract violation in function f at .* a<5" }
 
 #include <exception>
diff --git a/gcc/testsuite/g++.dg/contracts/pr115434.C b/gcc/testsuite/g++.dg/contracts/pr115434.C
index e9c847f8969d8..b21f5ae21de4b 100644
--- a/gcc/testsuite/g++.dg/contracts/pr115434.C
+++ b/gcc/testsuite/g++.dg/contracts/pr115434.C
@@ -2,6 +2,7 @@ 
 
 // { dg-do run }
 // { dg-options "-std=c++20 -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } }
 
 
 void foo (const int b)
@@ -13,4 +14,4 @@  int main()
    foo(3);
 }
 
-// { dg-output "contract violation in function foo at .*.C:8: b == 9.*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function foo at .*.C:9: b == 9.*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C b/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C
index 605a2135878b5..639d859a9620d 100644
--- a/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C
+++ b/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
+
 // Test handling of the case where we have a class g-r-o and a non-void
 // and non-class-type ramp return.
 
diff --git a/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C b/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C
index a7e3f3d1ac7d6..680e7c35c1e6e 100644
--- a/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C
+++ b/gcc/testsuite/g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
+
 // Test handling of the case where we have a void g-r-o and a non-void
 // and non-class-type ramp return.
 
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/pr110635.C b/gcc/testsuite/g++.dg/coroutines/pr110635.C
index ea4e0e853eb53..7b577ba718657 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr110635.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr110635.C
@@ -1,3 +1,4 @@ 
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #define CASE 0
 #include <coroutine>
diff --git a/gcc/testsuite/g++.dg/coroutines/pr110871.C b/gcc/testsuite/g++.dg/coroutines/pr110871.C
index 8a667c856ae87..7e6830a17d090 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr110871.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr110871.C
@@ -1,5 +1,7 @@ 
 // { dg-additional-options "-fcontracts -fcontract-continuation-mode=on" }
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
+
 #include <iostream>
 #include <coroutine>
 
@@ -59,4 +61,4 @@  int main() {
     std::cout << "main continues" << std::endl;
 }
 
-// { dg-output "contract violation in function seq at .*.C:45: from \<= to.*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function seq at .*.C:47: from \<= to.*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/coroutines/pr110872.C b/gcc/testsuite/g++.dg/coroutines/pr110872.C
index a809986f29621..3a7bd4fc26db9 100644
--- a/gcc/testsuite/g++.dg/coroutines/pr110872.C
+++ b/gcc/testsuite/g++.dg/coroutines/pr110872.C
@@ -1,5 +1,6 @@ 
 // { dg-additional-options "-fcontracts -fcontract-continuation-mode=on" }
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 #include <coroutine>
@@ -46,4 +47,4 @@  int main() {
     std::cout << "main continues" << std::endl;
 }
 
-// { dg-output "contract violation in function val at .*.C:35: g.is_valid().*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function val at .*.C:36: g.is_valid().*(\n|\r\n|\r)" }
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 dc21e97490077..a27d5af4cf162 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/symmetric-transfer-00-basic.C b/gcc/testsuite/g++.dg/coroutines/symmetric-transfer-00-basic.C
index a959408513560..5f663fb6a2c71 100644
--- a/gcc/testsuite/g++.dg/coroutines/symmetric-transfer-00-basic.C
+++ b/gcc/testsuite/g++.dg/coroutines/symmetric-transfer-00-basic.C
@@ -4,6 +4,7 @@ 
 
 // { dg-do run { target { i?86-*-linux-gnu x86_64-*-linux-gnu *-*-darwin* } } }
 // { dg-additional-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for chrono" { ! hostedlib } }
 
 #if __has_include(<coroutine>)
 
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 32d9c982d4a10..96ff6f6e51ba7 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,5 +1,6 @@ 
 //  { dg-do run }
 //  { dg-additional-options "-Wno-unused-label" }
+//  { 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 8a8d2d6fa5d91..de6d86f3610dd 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-nondependent.C b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl-nondependent.C
index 8e91d9557d2f4..399c0116a1278 100644
--- a/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl-nondependent.C
+++ b/gcc/testsuite/g++.dg/coroutines/torture/co-yield-03-tmpl-nondependent.C
@@ -1,4 +1,5 @@ 
 //  { dg-do run }
+//  { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
 
 // Test co_yield in templated code where the promise type is not dependent.
 
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 c5a0a38b2ca21..31d56d0ea9f3b 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 04c1ab362d2d2..e3479647e7037 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/cpp/pr80005.C b/gcc/testsuite/g++.dg/cpp/pr80005.C
index cc752616782f6..1c4b01ecae809 100644
--- a/gcc/testsuite/g++.dg/cpp/pr80005.C
+++ b/gcc/testsuite/g++.dg/cpp/pr80005.C
@@ -1,5 +1,6 @@ 
 // PR preprocessor/80005
 // { dg-do preprocess }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #undef vector
 #define vector NOPE
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/lambda/lambda-std-function.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C
index a410384a451f2..78a1284da5e64 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C
@@ -1,5 +1,6 @@ 
 // Test using std::function wrapper.
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for functional function" { ! hostedlib } }
 
 #include <functional>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
index e62cd08a614e4..f4cfcb527046b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
@@ -1,5 +1,6 @@ 
 // PR c++/56135
 // { dg-do run { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for functional function" { ! hostedlib } }
 
 #include <functional>
 
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/pr70887.C b/gcc/testsuite/g++.dg/cpp0x/pr70887.C
index f5b31b229003e..38b0fb2f9b2e4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr70887.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr70887.C
@@ -1,6 +1,7 @@ 
 // PR middle-end/70887
 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && c++11 } } }
 // { dg-options "-O2 -msse2" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <x86intrin.h>
 
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-extended-id-1.C b/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C
index 94c0cd430aa18..e9373e563d952 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C
@@ -1,6 +1,8 @@ 
 // { dg-do run { target c++11 } }
 // { dg-additional-options "-Wno-error=normalized" }
 // { dg-require-effective-target ucn }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
+
 #include <cstring>
 #include <cstddef>
 using namespace std;
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/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
index a78b6a36f36e1..cd58309c322f2 100644
--- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
@@ -1,4 +1,5 @@ 
 // { dg-options "-std=c++14 -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 //  C++98 features:
 
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-variadic2.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic2.C
index c70cc8d7747c5..b7ff755410867 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic2.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic2.C
@@ -1,6 +1,7 @@ 
 // PR c++/64105
 // This test was ICEing in C++11 mode.
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for functional function" { ! hostedlib } }
 
 #include <functional>
 
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..3fecda75e5554 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/constexpr-asm-1.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-1.C
index 311209acb43b2..204836019b5cf 100644
--- a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-1.C
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-1.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-std=gnu++17" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } */
 
 #include <string>
 
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C
index 0cf8940e109cf..6950374643c02 100644
--- a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-std=gnu++17" } */
+/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } */
 
 #include <string>
 
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/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
index e6f456b24154b..bb16425982e9e 100644
--- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
+++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile }
 // { dg-options "-std=c++17 -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 //  C++98 features:
 
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/ext-floating12.C b/gcc/testsuite/g++.dg/cpp23/ext-floating12.C
index a09c3fc10c4ec..c1edcd593ef7a 100644
--- a/gcc/testsuite/g++.dg/cpp23/ext-floating12.C
+++ b/gcc/testsuite/g++.dg/cpp23/ext-floating12.C
@@ -3,6 +3,7 @@ 
 // { dg-options "" }
 // { dg-add-options float16 }
 // { dg-add-options bfloat16 }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 #include <complex>
 #include <stdfloat>
diff --git a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
index d81aab756382d..a1ddc81cefdeb 100644
--- a/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
+++ b/gcc/testsuite/g++.dg/cpp23/feat-cxx2b.C
@@ -1,4 +1,5 @@ 
 // { dg-options "-std=c++2b -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 //  C++98 features:
 
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/cpp26/constexpr-new2.C b/gcc/testsuite/g++.dg/cpp26/constexpr-new2.C
index e333185425376..02200ecb36334 100644
--- a/gcc/testsuite/g++.dg/cpp26/constexpr-new2.C
+++ b/gcc/testsuite/g++.dg/cpp26/constexpr-new2.C
@@ -1,5 +1,6 @@ 
 // C++26 P2747R2 - constexpr placement new
 // { dg-do compile { target c++26 } }
+// { dg-skip-if "requires hosted libstdc++ for memory allocator" { ! hostedlib } }
 
 #include <memory>
 #include <new>
diff --git a/gcc/testsuite/g++.dg/cpp26/constexpr-voidptr1.C b/gcc/testsuite/g++.dg/cpp26/constexpr-voidptr1.C
index ce0ccbef5f9ad..c9e645515ab1e 100644
--- a/gcc/testsuite/g++.dg/cpp26/constexpr-voidptr1.C
+++ b/gcc/testsuite/g++.dg/cpp26/constexpr-voidptr1.C
@@ -1,5 +1,6 @@ 
 // PR c++/110344
 // { dg-do compile { target c++26 } }
+// { dg-skip-if "requires hosted libstdc++ for cwchar" { ! hostedlib } }
 
 #include <string_view>
 struct Sheep {
diff --git a/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C b/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
index 82be39c996f24..52c89e498fb07 100644
--- a/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
+++ b/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
@@ -1,4 +1,5 @@ 
 // { dg-options "-std=c++26 -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 //  C++98 features:
 
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 58c5002093769..a415de3f3b1f2 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" }
+// { 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/destroying-delete5.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C
index 6113d7f3d9e77..d298d1a124c8b 100644
--- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C
+++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete5.C
@@ -1,6 +1,7 @@ 
 // PR c++/91859
 // { dg-do run { target c++20 } }
 // { dg-additional-options -O2 }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <cstdlib>
 #include <new>
diff --git a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
index fc268d44e1a9d..3c43e9dae4655 100644
--- a/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
+++ b/gcc/testsuite/g++.dg/cpp2a/feat-cxx2a.C
@@ -1,4 +1,5 @@ 
 // { dg-options "-std=c++2a -I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
+// { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } }
 
 //  C++98 features:
 
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/missing-header-pr110164.C b/gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C
index 15980071c383e..737bbb503b6f7 100644
--- a/gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C
+++ b/gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C
@@ -1,4 +1,5 @@ 
 // { dg-require-effective-target c++11 }
+// { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } }
 
 #include <map>
 
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..5cc5a8f7dc0ac 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/expr/anew1.C b/gcc/testsuite/g++.dg/expr/anew1.C
index d7a4288802a10..d512936582305 100644
--- a/gcc/testsuite/g++.dg/expr/anew1.C
+++ b/gcc/testsuite/g++.dg/expr/anew1.C
@@ -1,4 +1,6 @@ 
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // PR 11228: array operator new, with zero-initialization and a variable sized array.
 // Regression test for PR 
 // Author: Matt Austern <austern@apple.com>
diff --git a/gcc/testsuite/g++.dg/expr/anew2.C b/gcc/testsuite/g++.dg/expr/anew2.C
index fbf2152d4acc1..36c9a2bbb713c 100644
--- a/gcc/testsuite/g++.dg/expr/anew2.C
+++ b/gcc/testsuite/g++.dg/expr/anew2.C
@@ -1,4 +1,6 @@ 
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // PR 11228: array operator new, with zero-initialization and a variable sized array.
 // Regression test for PR 
 // Author: Matt Austern <austern@apple.com>
diff --git a/gcc/testsuite/g++.dg/expr/anew3.C b/gcc/testsuite/g++.dg/expr/anew3.C
index 9bb64ea4ea70d..1ab639a5dc752 100644
--- a/gcc/testsuite/g++.dg/expr/anew3.C
+++ b/gcc/testsuite/g++.dg/expr/anew3.C
@@ -1,4 +1,6 @@ 
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // PR 11228: array operator new, with zero-initialization and a variable sized array.
 // Regression test for PR 
 // Author: Matt Austern <austern@apple.com>
diff --git a/gcc/testsuite/g++.dg/expr/anew4.C b/gcc/testsuite/g++.dg/expr/anew4.C
index 4ce1d8899f96b..9b55d45f0a630 100644
--- a/gcc/testsuite/g++.dg/expr/anew4.C
+++ b/gcc/testsuite/g++.dg/expr/anew4.C
@@ -1,4 +1,6 @@ 
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // PR 11228: array operator new, with zero-initialization and a variable sized array.
 // Regression test for PR 
 // Author: Matt Austern <austern@apple.com>
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/builtin10.C b/gcc/testsuite/g++.dg/ext/builtin10.C
index 64e8995f3bfe9..de3df967cc11a 100644
--- a/gcc/testsuite/g++.dg/ext/builtin10.C
+++ b/gcc/testsuite/g++.dg/ext/builtin10.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile { target correct_iso_cpp_string_wchar_protos } }
 // { dg-options "-O2 -fdump-tree-optimized" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-10.C b/gcc/testsuite/g++.dg/ext/cleanup-10.C
index 56aeb66b8507c..0d535e451a7ed 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-10.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-10.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* *-*-uclinux* } } */
 /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 /* Verify that cleanups work with exception handling through signal frames
    on alternate stack.  */
 
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-11.C b/gcc/testsuite/g++.dg/ext/cleanup-11.C
index c6d35607d1a36..b9e7426d44bfe 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-11.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-11.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* *-*-uclinux* } } */
 /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 /* Verify that cleanups work with exception handling through realtime signal
    frames on alternate stack.  */
 
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-5.C b/gcc/testsuite/g++.dg/ext/cleanup-5.C
index 167f01a7cc545..ee7b4a0d2481d 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-5.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-5.C
@@ -2,6 +2,7 @@ 
 /* { dg-do run } */
 /* { dg-options "-fexceptions" } */
 /* { dg-skip-if "" { "ia64-*-hpux11.*" } } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 /* Verify that cleanups work with exception handling.  */
 
 #include <unwind.h>
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-8.C b/gcc/testsuite/g++.dg/ext/cleanup-8.C
index e99508dfdbfa9..13d55f174d510 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-8.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-8.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* *-*-uclinux* } } */
 /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 /* Verify that cleanups work with exception handling through signal
    frames.  */
 
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-9.C b/gcc/testsuite/g++.dg/ext/cleanup-9.C
index 45e5f90bceefc..282df75c1a838 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-9.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-9.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* *-*-uclinux* } } */
 /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 /* Verify that cleanups work with exception handling through realtime
    signal frames.  */
 
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_invocable2.C b/gcc/testsuite/g++.dg/ext/is_invocable2.C
index a68aefd3e13b2..3df31656fcba5 100644
--- a/gcc/testsuite/g++.dg/ext/is_invocable2.C
+++ b/gcc/testsuite/g++.dg/ext/is_invocable2.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for functional function" { ! hostedlib } }
 // __is_invocable should handle std::reference_wrapper correctly.
 
 #include <functional>
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/gcov/gcov-14.C b/gcc/testsuite/g++.dg/gcov/gcov-14.C
index b069d0e1881c6..68f3ab4305587 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov-14.C
+++ b/gcc/testsuite/g++.dg/gcov/gcov-14.C
@@ -1,5 +1,6 @@ 
 /* { dg-options "-fprofile-arcs -ftest-coverage -Ofast" } */
 /* { dg-do run { target native } } */
+/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } */
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-18.C b/gcc/testsuite/g++.dg/gcov/gcov-18.C
index 620aef1269955..063440c881c42 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov-18.C
+++ b/gcc/testsuite/g++.dg/gcov/gcov-18.C
@@ -1,5 +1,6 @@ 
 /* { dg-options "--coverage -fcondition-coverage -std=c++11" } */
 /* { dg-do run { target native } } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 #include <vector>
 #include <stdexcept>
diff --git a/gcc/testsuite/g++.dg/gcov/pr88045.C b/gcc/testsuite/g++.dg/gcov/pr88045.C
index 1b077a5e61a26..329c74fb93dbb 100644
--- a/gcc/testsuite/g++.dg/gcov/pr88045.C
+++ b/gcc/testsuite/g++.dg/gcov/pr88045.C
@@ -1,6 +1,7 @@ 
 // PR gcov-profile/88045
 // { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
 // { dg-do run { target native } }
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 #include <numeric>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/gcov/pr88263-2.C b/gcc/testsuite/g++.dg/gcov/pr88263-2.C
index f0cf15f5d0a34..cc0a08e9026cf 100644
--- a/gcc/testsuite/g++.dg/gcov/pr88263-2.C
+++ b/gcc/testsuite/g++.dg/gcov/pr88263-2.C
@@ -1,6 +1,7 @@ 
 // PR gcov-profile/88263
 // { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
 // { dg-do run { target native } }
+/* { dg-skip-if "requires hosted libstdc++ for sstream" { ! hostedlib } } */
 
 #include <sstream>
 
diff --git a/gcc/testsuite/g++.dg/gcov/pr88263.C b/gcc/testsuite/g++.dg/gcov/pr88263.C
index 854772f0594c9..4318a26abac52 100644
--- a/gcc/testsuite/g++.dg/gcov/pr88263.C
+++ b/gcc/testsuite/g++.dg/gcov/pr88263.C
@@ -1,6 +1,7 @@ 
 // PR gcov-profile/88263
 // { dg-options "-fprofile-arcs -ftest-coverage -std=c++11" }
 // { dg-do run { target native } }
+/* { dg-skip-if "requires hosted libstdc++ for sstream" { ! hostedlib } } */
 
 #include <sstream>
 
diff --git a/gcc/testsuite/g++.dg/goacc/pr107028-2.C b/gcc/testsuite/g++.dg/goacc/pr107028-2.C
index cf741bd78c7a9..7bef75090a8f0 100644
--- a/gcc/testsuite/g++.dg/goacc/pr107028-2.C
+++ b/gcc/testsuite/g++.dg/goacc/pr107028-2.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile }
 // { dg-additional-options "-fdump-tree-gimple" }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <cstdlib>
 
diff --git a/gcc/testsuite/g++.dg/gomp/has_device_addr-non-lvalue-1.C b/gcc/testsuite/g++.dg/gomp/has_device_addr-non-lvalue-1.C
index 3d778538d3abf..295b1b7cc84ef 100644
--- a/gcc/testsuite/g++.dg/gomp/has_device_addr-non-lvalue-1.C
+++ b/gcc/testsuite/g++.dg/gomp/has_device_addr-non-lvalue-1.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cstdio>
 #include <cstring>
diff --git a/gcc/testsuite/g++.dg/gomp/ind-base-3.C b/gcc/testsuite/g++.dg/gomp/ind-base-3.C
index 7695b1f907e17..e3ecdddf9cb26 100644
--- a/gcc/testsuite/g++.dg/gomp/ind-base-3.C
+++ b/gcc/testsuite/g++.dg/gomp/ind-base-3.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/gomp/map-assignment-1.C b/gcc/testsuite/g++.dg/gomp/map-assignment-1.C
index 5979ec379f19e..17862ab3b169c 100644
--- a/gcc/testsuite/g++.dg/gomp/map-assignment-1.C
+++ b/gcc/testsuite/g++.dg/gomp/map-assignment-1.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 int main (int argc, char *argv[])
diff --git a/gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C b/gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C
index d720d4318ae45..2f75b238ebd03 100644
--- a/gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C
+++ b/gcc/testsuite/g++.dg/gomp/map-lvalue-ref-1.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 int glob = 10;
diff --git a/gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C b/gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C
index c4023f59fc608..110996b349c17 100644
--- a/gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C
+++ b/gcc/testsuite/g++.dg/gomp/map-ptrmem-1.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C b/gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C
index fbf379da0eb20..644e5bb3c84f1 100644
--- a/gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C
+++ b/gcc/testsuite/g++.dg/gomp/map-ptrmem-2.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 struct S {
diff --git a/gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C b/gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C
index 3af9668202cb5..bc9d4dc25d7a5 100644
--- a/gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C
+++ b/gcc/testsuite/g++.dg/gomp/map-static-cast-lvalue-1.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 int foo (int x)
diff --git a/gcc/testsuite/g++.dg/gomp/map-ternary-1.C b/gcc/testsuite/g++.dg/gomp/map-ternary-1.C
index 7b365a909bbbb..7017fbd30849a 100644
--- a/gcc/testsuite/g++.dg/gomp/map-ternary-1.C
+++ b/gcc/testsuite/g++.dg/gomp/map-ternary-1.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 int foo (bool yesno)
diff --git a/gcc/testsuite/g++.dg/gomp/member-array-2.C b/gcc/testsuite/g++.dg/gomp/member-array-2.C
index caf8ece426248..a4e3a220c41be 100644
--- a/gcc/testsuite/g++.dg/gomp/member-array-2.C
+++ b/gcc/testsuite/g++.dg/gomp/member-array-2.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
 #include <cassert>
 
 typedef int intarr100[100];
diff --git a/gcc/testsuite/g++.dg/gomp/pr71910.C b/gcc/testsuite/g++.dg/gomp/pr71910.C
index 0063be8a9b0f9..aea9483f4396d 100644
--- a/gcc/testsuite/g++.dg/gomp/pr71910.C
+++ b/gcc/testsuite/g++.dg/gomp/pr71910.C
@@ -1,6 +1,7 @@ 
 // PR target/71910
 // { dg-do compile }
 // { dg-additional-options "-O2" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/gomp/pr91118-1.C b/gcc/testsuite/g++.dg/gomp/pr91118-1.C
index f29d69db08470..2ed7e2eabe2ad 100644
--- a/gcc/testsuite/g++.dg/gomp/pr91118-1.C
+++ b/gcc/testsuite/g++.dg/gomp/pr91118-1.C
@@ -1,6 +1,7 @@ 
 // PR c++/91118
 // { dg-do compile }
 // { dg-additional-options "-fsanitize=undefined" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.dg/gomp/sink-2.C b/gcc/testsuite/g++.dg/gomp/sink-2.C
index d1681a77aadcf..26669ef588e71 100644
--- a/gcc/testsuite/g++.dg/gomp/sink-2.C
+++ b/gcc/testsuite/g++.dg/gomp/sink-2.C
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } */
 
 /* Tests iterators are allowed in ordered loops and that we keep track
    of the original iterator DECL for diagnostic purposes.  */
diff --git a/gcc/testsuite/g++.dg/gomp/target-lambda-2.C b/gcc/testsuite/g++.dg/gomp/target-lambda-2.C
index bdf2564cd042d..7c504de36dfdd 100644
--- a/gcc/testsuite/g++.dg/gomp/target-lambda-2.C
+++ b/gcc/testsuite/g++.dg/gomp/target-lambda-2.C
@@ -1,5 +1,7 @@ 
 // We use 'auto' without a function return type, so specify dialect here
 // { dg-additional-options "-std=c++14 -fdump-tree-gimple" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib abort" { ! hostedlib } }
+
 #include <cstdlib>
 
 #define N 10
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-3.C b/gcc/testsuite/g++.dg/gomp/target-this-3.C
index bc2cc0b297dcb..f4996b131142a 100644
--- a/gcc/testsuite/g++.dg/gomp/target-this-3.C
+++ b/gcc/testsuite/g++.dg/gomp/target-this-3.C
@@ -1,5 +1,7 @@ 
 // { dg-do compile }
 // { dg-additional-options "-fdump-tree-gimple" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
+
 #include <cstdlib>
 #include <cstring>
 extern "C" void abort ();
diff --git a/gcc/testsuite/g++.dg/gomp/target-this-4.C b/gcc/testsuite/g++.dg/gomp/target-this-4.C
index 9ade3cc0b2b12..bbcde3df23b5e 100644
--- a/gcc/testsuite/g++.dg/gomp/target-this-4.C
+++ b/gcc/testsuite/g++.dg/gomp/target-this-4.C
@@ -1,5 +1,7 @@ 
 // We use 'auto' without a function return type, so specify dialect here
 // { dg-additional-options "-std=c++14 -fdump-tree-gimple" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
+
 #include <cstdlib>
 #include <cstring>
 
diff --git a/gcc/testsuite/g++.dg/gomp/tile-1.C b/gcc/testsuite/g++.dg/gomp/tile-1.C
index cc45dcdf88050..bcfdc94382905 100644
--- a/gcc/testsuite/g++.dg/gomp/tile-1.C
+++ b/gcc/testsuite/g++.dg/gomp/tile-1.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/gomp/tile-2.C b/gcc/testsuite/g++.dg/gomp/tile-2.C
index dcaa8d736bbfd..757b7fc60cee9 100644
--- a/gcc/testsuite/g++.dg/gomp/tile-2.C
+++ b/gcc/testsuite/g++.dg/gomp/tile-2.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/gomp/unroll-1.C b/gcc/testsuite/g++.dg/gomp/unroll-1.C
index d4b73004b7cfa..f9cb65af5d881 100644
--- a/gcc/testsuite/g++.dg/gomp/unroll-1.C
+++ b/gcc/testsuite/g++.dg/gomp/unroll-1.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/gomp/unroll-2.C b/gcc/testsuite/g++.dg/gomp/unroll-2.C
index d214d728c3a46..1bc21724c78db 100644
--- a/gcc/testsuite/g++.dg/gomp/unroll-2.C
+++ b/gcc/testsuite/g++.dg/gomp/unroll-2.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/gomp/unroll-3.C b/gcc/testsuite/g++.dg/gomp/unroll-3.C
index 6ef24ac2ffbcd..1afe6f4d06561 100644
--- a/gcc/testsuite/g++.dg/gomp/unroll-3.C
+++ b/gcc/testsuite/g++.dg/gomp/unroll-3.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile { target c++11 } }
 // { dg-additional-options "-fdump-tree-original -fdump-tree-gimple" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/graphite/id-1.C b/gcc/testsuite/g++.dg/graphite/id-1.C
index 5770e905dfbd9..987d326e3b69b 100644
--- a/gcc/testsuite/g++.dg/graphite/id-1.C
+++ b/gcc/testsuite/g++.dg/graphite/id-1.C
@@ -1,3 +1,5 @@ 
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
+
 #include <vector>
 
 template <int rank, int dim> class Tensor;
diff --git a/gcc/testsuite/g++.dg/graphite/pr42130.C b/gcc/testsuite/g++.dg/graphite/pr42130.C
index ee31abad0ee01..47052cfecbccc 100644
--- a/gcc/testsuite/g++.dg/graphite/pr42130.C
+++ b/gcc/testsuite/g++.dg/graphite/pr42130.C
@@ -1,4 +1,7 @@ 
 /* { dg-options "-O2 -fgraphite-identity -fno-tree-ch" } */
+/* { dg-do run  } */
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
+
 #include <vector>
 
 using std::vector;
@@ -15,5 +18,3 @@  int main()
   return 0;
 }
 
-/* { dg-do run  } */
-
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/new11.C b/gcc/testsuite/g++.dg/init/new11.C
index a13f262aa64ab..11c4fe5732f92 100644
--- a/gcc/testsuite/g++.dg/init/new11.C
+++ b/gcc/testsuite/g++.dg/init/new11.C
@@ -1,5 +1,6 @@ 
 // PR c++/17670
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib size_t" { ! hostedlib } }
 
 #include <cstdlib>
 #include <new>
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/init/value3.C b/gcc/testsuite/g++.dg/init/value3.C
index 487baabeceb68..c544ec6653265 100644
--- a/gcc/testsuite/g++.dg/init/value3.C
+++ b/gcc/testsuite/g++.dg/init/value3.C
@@ -1,5 +1,6 @@ 
 // Testcase for value-initialization in new-expressions.
 // { dg-do run }
+// { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } }
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-29.C b/gcc/testsuite/g++.dg/ipa/devirt-29.C
index b4f24a1044ca7..fbd5f5f0cec0d 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..4c6e2d266f7a8 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..02dabceb4cc2c 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 0b1d63c3c4b55..e33d3e1810eaf 100644
--- a/gcc/testsuite/g++.dg/lookup/pr21802.C
+++ b/gcc/testsuite/g++.dg/lookup/pr21802.C
@@ -1,6 +1,8 @@ 
 // PR c++/21802
 // { dg-do run }
 // { dg-require-effective-target size20plus }
+// { 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/pr66180_0.C b/gcc/testsuite/g++.dg/lto/pr66180_0.C
index cfb496bec4ad9..fa597dea88bb3 100644
--- a/gcc/testsuite/g++.dg/lto/pr66180_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr66180_0.C
@@ -1,6 +1,8 @@ 
 // { dg-lto-do link }
 // { dg-require-effective-target lto_incremental }
 // { dg-lto-options { { -flto -std=c++14 -r -nostdlib } } }
+/* { dg-skip-if "requires hosted libstdc++ for memory make_unique" { ! hostedlib } } */
+
 #include <memory>
 namespace {
 class A {
diff --git a/gcc/testsuite/g++.dg/lto/pr80287_0.C b/gcc/testsuite/g++.dg/lto/pr80287_0.C
index ea655c97b29d3..9ca9f7f15f6e5 100644
--- a/gcc/testsuite/g++.dg/lto/pr80287_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr80287_0.C
@@ -1,5 +1,6 @@ 
 // { dg-lto-options { "-std=gnu++17" } }
 // { dg-lto-do run }
+// { dg-skip-if "requires hosted libstdc++ for any" { ! hostedlib } }
 
 // Copyright (C) 2014-2017 Free Software Foundation, Inc.
 //
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 723726451f4e9..98743b17ea2a1 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 aa36c8d6b1b68..81c0651e909bc 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-1_b.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-1_b.C
@@ -1,5 +1,7 @@ 
 // { dg-module-do run }
 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-continuation-mode=on" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
+
 #include <cstdio>
 import foo;
 
diff --git a/gcc/testsuite/g++.dg/modules/contracts-2_a.C b/gcc/testsuite/g++.dg/modules/contracts-2_a.C
index 3d78c412d4684..3307d929b82d6 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-2_a.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-2_a.C
@@ -47,3 +47,4 @@  export int pre_print2(int n);
 export int fn3(int n)
   [[ pre: pre_print2(n) > 0 ]];
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
diff --git a/gcc/testsuite/g++.dg/modules/contracts-2_b.C b/gcc/testsuite/g++.dg/modules/contracts-2_b.C
index 01939aeb947bb..9fdcb0c46a4a2 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-2_b.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-2_b.C
@@ -33,3 +33,4 @@  int fn3(int x)
   return x;
 }
 
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
diff --git a/gcc/testsuite/g++.dg/modules/contracts-3_a.C b/gcc/testsuite/g++.dg/modules/contracts-3_a.C
index b931ec0ddf70c..d004a68742fda 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 1a29e2c3e5d64..3b9120fe679aa 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-3_b.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-3_b.C
@@ -1,5 +1,7 @@ 
 // { 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 } }
+
 #include <cstdio>
 import foo;
 
diff --git a/gcc/testsuite/g++.dg/modules/contracts-4_a.C b/gcc/testsuite/g++.dg/modules/contracts-4_a.C
index a135f50fb7d87..0216caef18176 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 9e6b7c3d4de5d..5ac5fde159b46 100644
--- a/gcc/testsuite/g++.dg/modules/contracts-4_d.C
+++ b/gcc/testsuite/g++.dg/modules/contracts-4_d.C
@@ -1,5 +1,7 @@ 
 // { dg-module-do run }
 // { dg-additional-options "-fmodules-ts -fcontracts" }
+// { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
+
 #include <cstdio>
 import foo;
 import bar;
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/hello-2_a.C b/gcc/testsuite/g++.dg/modules/hello-2_a.C
index a8f8b813839fe..89bb92b85fb52 100644
--- a/gcc/testsuite/g++.dg/modules/hello-2_a.C
+++ b/gcc/testsuite/g++.dg/modules/hello-2_a.C
@@ -1,6 +1,7 @@ 
 // PR c++/105512
 // { dg-additional-options -fmodules-ts }
 // { dg-module-cmi Hello2 }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 module;
 #include <string>
diff --git a/gcc/testsuite/g++.dg/modules/hello-2_b.C b/gcc/testsuite/g++.dg/modules/hello-2_b.C
index dafd3c2f7a1b4..35b6ea58939d4 100644
--- a/gcc/testsuite/g++.dg/modules/hello-2_b.C
+++ b/gcc/testsuite/g++.dg/modules/hello-2_b.C
@@ -1,6 +1,7 @@ 
 // PR c++/105512
 // { dg-additional-options -fmodules-ts }
 // { dg-module-do run }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 import Hello2;
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/p1689-2.C b/gcc/testsuite/g++.dg/modules/p1689-2.C
index 5d7fe52a809ba..8c7afe4050e52 100644
--- a/gcc/testsuite/g++.dg/modules/p1689-2.C
+++ b/gcc/testsuite/g++.dg/modules/p1689-2.C
@@ -5,6 +5,7 @@ 
 // { dg-additional-options -fdeps-format=p1689r5 }
 // { dg-additional-options -fdeps-target=p1689-2.o }
 // { dg-additional-options -fdeps-file=p1689-2.ddi }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 // Export a module partition that uses modules.
 
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/pr99023_a.X b/gcc/testsuite/g++.dg/modules/pr99023_a.X
index 507e956953565..6ae2cf4b2a3ea 100644
--- a/gcc/testsuite/g++.dg/modules/pr99023_a.X
+++ b/gcc/testsuite/g++.dg/modules/pr99023_a.X
@@ -1,6 +1,7 @@ 
 // PR c++/99023, ICE
 // { dg-require-effective-target c++20_only }
 // { dg-additional-options {-x c++-system-header initializer_list -fmodules-ts --param ggc-min-expand=0} }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 // { dg-prune-output {linker input file unused} }
 
diff --git a/gcc/testsuite/g++.dg/modules/pr99166_a.X b/gcc/testsuite/g++.dg/modules/pr99166_a.X
index 0649d053b306b..24527a011eb05 100644
--- a/gcc/testsuite/g++.dg/modules/pr99166_a.X
+++ b/gcc/testsuite/g++.dg/modules/pr99166_a.X
@@ -1,5 +1,6 @@ 
 // PR c++/99166, diagnostic
 // { dg-additional-options {-x c++-system-header iostream -fmodules-ts -flang-info-module-cmi} }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 // { dg-regexp {[^\n]*iostream: note: writing CMI 'gcm.cache/[^[\n]*iostream.gcm'\n} }
 // { dg-prune-output {linker input file unused} }
diff --git a/gcc/testsuite/g++.dg/modules/pr99166_b.C b/gcc/testsuite/g++.dg/modules/pr99166_b.C
index ac20116e641e9..25b90daf98767 100644
--- a/gcc/testsuite/g++.dg/modules/pr99166_b.C
+++ b/gcc/testsuite/g++.dg/modules/pr99166_b.C
@@ -1,4 +1,6 @@ 
 // { dg-additional-options {-fmodules-ts -flang-info-module-cmi=<iostream>} }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
+
 export module Foo;
 import <iostream>;
 
diff --git a/gcc/testsuite/g++.dg/modules/pr99425-2_a.X b/gcc/testsuite/g++.dg/modules/pr99425-2_a.X
index 9a44dc335671a..36f91637e763c 100644
--- a/gcc/testsuite/g++.dg/modules/pr99425-2_a.X
+++ b/gcc/testsuite/g++.dg/modules/pr99425-2_a.X
@@ -3,5 +3,6 @@ 
 
 // { dg-additional-options {-x c++-system-header stdexcept -fmodules-ts} }
 // { dg-prune-output {linker input file unused} }
+// { dg-skip-if "requires hosted libstdc++ for stdexcept" { ! hostedlib } }
 
 No! DO NOT COMPILE;
diff --git a/gcc/testsuite/g++.dg/modules/pr99425-2_b.X b/gcc/testsuite/g++.dg/modules/pr99425-2_b.X
index 5e453542cd17c..baf653a232a3e 100644
--- a/gcc/testsuite/g++.dg/modules/pr99425-2_b.X
+++ b/gcc/testsuite/g++.dg/modules/pr99425-2_b.X
@@ -1,4 +1,5 @@ 
 // { dg-additional-options {-x c++-system-header mutex -fmodules-ts} }
 // { dg-prune-output {linker input file unused} }
+// { dg-skip-if "requires hosted libstdc++ for mutex" { ! hostedlib } }
 
 No! DO NOT COMPILE;
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-7_a.H b/gcc/testsuite/g++.dg/modules/xtreme-header-7_a.H
index bf7859fba9912..9c42b7a38ced0 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-7_a.H
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-7_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-7_b.C b/gcc/testsuite/g++.dg/modules/xtreme-header-7_b.C
index 3992a24501b9e..b7df2723b9d22 100644
--- a/gcc/testsuite/g++.dg/modules/xtreme-header-7_b.C
+++ b/gcc/testsuite/g++.dg/modules/xtreme-header-7_b.C
@@ -1,5 +1,6 @@ 
 // A version of xtreme-header_b.C that doesn't use -fno-module-lazy.
 // { dg-additional-options -fmodules-ts }
+// { dg-skip-if "requires hosted libstdc++ for any in xtreme-header.h" { ! hostedlib } }
 
 #include "xtreme-header.h"
 import "xtreme-header-7_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/builtins2.C b/gcc/testsuite/g++.dg/opt/builtins2.C
index 658c128d62dee..b273f1f63b6e0 100644
--- a/gcc/testsuite/g++.dg/opt/builtins2.C
+++ b/gcc/testsuite/g++.dg/opt/builtins2.C
@@ -2,6 +2,7 @@ 
 // We should handle asinh as a built-in in C++0x mode, even when strict.
 // { dg-do compile { target c++11 } }
 // { dg-final { scan-assembler-not "asinh" } }
+// { dg-skip-if "requires hosted libstdc++ for math" { ! hostedlib } }
 
 #include <math.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/pr103989.C b/gcc/testsuite/g++.dg/opt/pr103989.C
index 4604811b42a1b..dfb14546e3525 100644
--- a/gcc/testsuite/g++.dg/opt/pr103989.C
+++ b/gcc/testsuite/g++.dg/opt/pr103989.C
@@ -1,5 +1,6 @@ 
 // { dg-require-effective-target c++17 }
 // { dg-options "-Og -Wall" }
+// { dg-skip-if "requires hosted libstdc++ for memory shared_ptr" { ! hostedlib } }
 
 #include <optional>
 #include <memory>
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/pr110879.C b/gcc/testsuite/g++.dg/opt/pr110879.C
index 57556605a511e..3445850ccbf79 100644
--- a/gcc/testsuite/g++.dg/opt/pr110879.C
+++ b/gcc/testsuite/g++.dg/opt/pr110879.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile { target c++11 } }
 // { dg-options "-O3 -fdump-tree-optimized" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
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..e4b7cf0b5c135 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/pr65074.C b/gcc/testsuite/g++.dg/opt/pr65074.C
index 01c5926e6626c..0124c51823924 100644
--- a/gcc/testsuite/g++.dg/opt/pr65074.C
+++ b/gcc/testsuite/g++.dg/opt/pr65074.C
@@ -1,6 +1,7 @@ 
 // PR middle-end/65074
 // { dg-do link { target pie } }
 // { dg-options "-pie -fpie -O2" }
+// { dg-skip-if "requires hosted libstdc++ for fstream" { ! hostedlib } }
 
 #include <fstream>
 
diff --git a/gcc/testsuite/g++.dg/opt/pr66119.C b/gcc/testsuite/g++.dg/opt/pr66119.C
index c129633894ff1..d1b1845a25867 100644
--- a/gcc/testsuite/g++.dg/opt/pr66119.C
+++ b/gcc/testsuite/g++.dg/opt/pr66119.C
@@ -4,6 +4,7 @@ 
 
 /* { dg-do compile  { target { { i?86-*-* x86_64-*-* } && c++11 } }  }  */
 /* { dg-options "-O3 -mavx -fdump-tree-sra -march=slm -mtune=slm -fno-early-inlining" } */
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <immintrin.h>
 
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/pr80385.C b/gcc/testsuite/g++.dg/opt/pr80385.C
index f18abc941f3f1..de3ae17f07d1d 100644
--- a/gcc/testsuite/g++.dg/opt/pr80385.C
+++ b/gcc/testsuite/g++.dg/opt/pr80385.C
@@ -1,6 +1,7 @@ 
 // PR rtl-optimization/80385
 // { dg-do compile { target { i?86-*-* x86_64-*-* } } }
 // { dg-options "-Ofast -msse2" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <x86intrin.h>
 
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/pr94223.C b/gcc/testsuite/g++.dg/opt/pr94223.C
index 0de012de50405..f06f1059b3db6 100644
--- a/gcc/testsuite/g++.dg/opt/pr94223.C
+++ b/gcc/testsuite/g++.dg/opt/pr94223.C
@@ -1,5 +1,6 @@ 
 // PR c++/94223
 // { dg-do compile }
 // { dg-options "-O0 -std=c++2a -fcompare-debug" }
+// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 #include "../cpp1z/init-statement6.C"
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/i386-1.C b/gcc/testsuite/g++.dg/other/i386-1.C
index ec572ec948d69..108af19e4c832 100644
--- a/gcc/testsuite/g++.dg/other/i386-1.C
+++ b/gcc/testsuite/g++.dg/other/i386-1.C
@@ -1,6 +1,7 @@ 
 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-msse2" } */
 /* { dg-require-effective-target sse2_runtime } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <xmmintrin.h>
 
diff --git a/gcc/testsuite/g++.dg/other/i386-11.C b/gcc/testsuite/g++.dg/other/i386-11.C
index 8e06617fca55e..f28cfcfa14b02 100644
--- a/gcc/testsuite/g++.dg/other/i386-11.C
+++ b/gcc/testsuite/g++.dg/other/i386-11.C
@@ -2,6 +2,7 @@ 
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-require-effective-target c++11 }
 // { dg-options "-O2 -msse2" }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <xmmintrin.h>
 #include <emmintrin.h>
diff --git a/gcc/testsuite/g++.dg/other/i386-2.C b/gcc/testsuite/g++.dg/other/i386-2.C
index 5a4005c063c4f..d0492dc5d6888 100644
--- a/gcc/testsuite/g++.dg/other/i386-2.C
+++ b/gcc/testsuite/g++.dg/other/i386-2.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 /* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h,
    xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h,
diff --git a/gcc/testsuite/g++.dg/other/i386-3.C b/gcc/testsuite/g++.dg/other/i386-3.C
index 51977ae6159bf..3bfc83915fc6f 100644
--- a/gcc/testsuite/g++.dg/other/i386-3.C
+++ b/gcc/testsuite/g++.dg/other/i386-3.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 /* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h,
    xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h,
diff --git a/gcc/testsuite/g++.dg/other/i386-4.C b/gcc/testsuite/g++.dg/other/i386-4.C
index 3e0d94e952cd4..3cd6f4cb05310 100644
--- a/gcc/testsuite/g++.dg/other/i386-4.C
+++ b/gcc/testsuite/g++.dg/other/i386-4.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-O1 -msse2" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <xmmintrin.h>
 
diff --git a/gcc/testsuite/g++.dg/other/i386-7.C b/gcc/testsuite/g++.dg/other/i386-7.C
index e2ad51e528dde..704c5b7e24f14 100644
--- a/gcc/testsuite/g++.dg/other/i386-7.C
+++ b/gcc/testsuite/g++.dg/other/i386-7.C
@@ -2,6 +2,7 @@ 
 /* We were using SSE4.2 builtins without the extension available.  */
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-O -pedantic-errors" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <x86intrin.h>
 
diff --git a/gcc/testsuite/g++.dg/other/i386-8.C b/gcc/testsuite/g++.dg/other/i386-8.C
index a9465ef12bc31..6bb229f19281c 100644
--- a/gcc/testsuite/g++.dg/other/i386-8.C
+++ b/gcc/testsuite/g++.dg/other/i386-8.C
@@ -2,6 +2,7 @@ 
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-options "-O2 -msse2" }
 // { dg-options "-O2 -msse2 -fpic" { target fpic } }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <xmmintrin.h>
 
diff --git a/gcc/testsuite/g++.dg/other/mmintrin.C b/gcc/testsuite/g++.dg/other/mmintrin.C
index 417a1acc6de13..3daf378916eaa 100644
--- a/gcc/testsuite/g++.dg/other/mmintrin.C
+++ b/gcc/testsuite/g++.dg/other/mmintrin.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-options "-msse" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <xmmintrin.h>
diff --git a/gcc/testsuite/g++.dg/other/pr34435.C b/gcc/testsuite/g++.dg/other/pr34435.C
index 5352a40eb6912..8b7efd4fbfefc 100644
--- a/gcc/testsuite/g++.dg/other/pr34435.C
+++ b/gcc/testsuite/g++.dg/other/pr34435.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-msse2 -Wno-abi" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <emmintrin.h>
 
diff --git a/gcc/testsuite/g++.dg/other/pr40446.C b/gcc/testsuite/g++.dg/other/pr40446.C
index 72cd1960649e1..3d3a6b8b9659d 100644
--- a/gcc/testsuite/g++.dg/other/pr40446.C
+++ b/gcc/testsuite/g++.dg/other/pr40446.C
@@ -2,6 +2,7 @@ 
 // { dg-do run { target i?86-*-* x86_64-*-* } }
 // { dg-options "-O1 -msse2" }
 // { dg-require-effective-target sse2_runtime }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <emmintrin.h>
 
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/pr49133.C b/gcc/testsuite/g++.dg/other/pr49133.C
index a59687f9c742a..bd30cc749b983 100644
--- a/gcc/testsuite/g++.dg/other/pr49133.C
+++ b/gcc/testsuite/g++.dg/other/pr49133.C
@@ -1,6 +1,7 @@ 
 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
 /* { dg-options "-O2 -msse2" } */
 /* { dg-require-effective-target sse2_runtime } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <xmmintrin.h>
 
diff --git a/gcc/testsuite/g++.dg/other/ucnid-1-utf8.C b/gcc/testsuite/g++.dg/other/ucnid-1-utf8.C
index dab415235951f..c49e8c44480b0 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..f9dd9fb97a891 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..7ea28b5b09d8b 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-1.Hs b/gcc/testsuite/g++.dg/pch/system-1.Hs
index 604782e4dc7e8..d08c6c05c998d 100644
--- a/gcc/testsuite/g++.dg/pch/system-1.Hs
+++ b/gcc/testsuite/g++.dg/pch/system-1.Hs
@@ -1 +1,3 @@ 
+// { dg-skip-if "requires hosted libstdc++ for iostream in system-1.H" { ! hostedlib } }
+
 #include <iostream>
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/pch/system-2.Hs b/gcc/testsuite/g++.dg/pch/system-2.Hs
index 13c79d104efc3..0570721140009 100644
--- a/gcc/testsuite/g++.dg/pch/system-2.Hs
+++ b/gcc/testsuite/g++.dg/pch/system-2.Hs
@@ -1,2 +1,4 @@ 
+// { dg-skip-if "requires hosted libstdc++ for iostream in system-1.H" { ! hostedlib } }
+
 #include <iostream>
 #include <string>
diff --git a/gcc/testsuite/g++.dg/pr100253.C b/gcc/testsuite/g++.dg/pr100253.C
index 0102caa7df863..031b4fa58db75 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..4a1937eace624 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/pr80481.C b/gcc/testsuite/g++.dg/pr80481.C
index c2931100906f1..07dcdf09e004c 100644
--- a/gcc/testsuite/g++.dg/pr80481.C
+++ b/gcc/testsuite/g++.dg/pr80481.C
@@ -4,6 +4,7 @@ 
 // { dg-options "-Ofast -funroll-loops -fopenmp -march=skylake-avx512" }
 // Disabling epilogues until we find a better way to deal with scans.
 // { dg-additional-options "--param vect-epilogues-nomask=0" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 
 #include <math.h>
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 d111c0acf1173..50f642559641d 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..8c9189447ea17 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/tm/inherit2.C b/gcc/testsuite/g++.dg/tm/inherit2.C
index 366f9b30e9092..adaf8a9a932c4 100644
--- a/gcc/testsuite/g++.dg/tm/inherit2.C
+++ b/gcc/testsuite/g++.dg/tm/inherit2.C
@@ -1,5 +1,6 @@ 
 // Testcase from TM TS
 // { dg-options "-std=c++14 -fgnu-tm" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 
 #include <iostream>
 
diff --git a/gcc/testsuite/g++.dg/tm/pr46270.C b/gcc/testsuite/g++.dg/tm/pr46270.C
index 291e620a38792..64ebb6bc5e651 100644
--- a/gcc/testsuite/g++.dg/tm/pr46270.C
+++ b/gcc/testsuite/g++.dg/tm/pr46270.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile }
 // { dg-options "-fgnu-tm" }
+// { dg-skip-if "requires hosted libstdc++ for list" { ! hostedlib } }
 
 #include <list>
 class Game
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/pr10148.C b/gcc/testsuite/g++.dg/torture/pr10148.C
index ed278f9f8d859..b5483f3ca315e 100644
--- a/gcc/testsuite/g++.dg/torture/pr10148.C
+++ b/gcc/testsuite/g++.dg/torture/pr10148.C
@@ -1,4 +1,5 @@ 
 /* { dg-do run } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include <stdlib.h>
 #include <assert.h>
diff --git a/gcc/testsuite/g++.dg/torture/pr103669.C b/gcc/testsuite/g++.dg/torture/pr103669.C
index a9509c354f18f..fa96e309fecd9 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 c8d4661e86d48..eaa61bd77c0c4 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 -Wno-unused-result" }
+// { 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..cbed17e546a08 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..1ace4d9f6b264 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..0f4e1e6c151df 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/pr86763.C b/gcc/testsuite/g++.dg/torture/pr86763.C
index 8455ac9ce1294..0d0061c78bc23 100644
--- a/gcc/testsuite/g++.dg/torture/pr86763.C
+++ b/gcc/testsuite/g++.dg/torture/pr86763.C
@@ -1,6 +1,7 @@ 
 // { dg-do run { target { *-*-linux* } } }
 // { dg-additional-options "-fschedule-insns2 -fstrict-aliasing" }
 // { dg-additional-options "-lrt" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <cstdint>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/torture/pr91334.C b/gcc/testsuite/g++.dg/torture/pr91334.C
index ba79d712b0793..187ab84e978b0 100644
--- a/gcc/testsuite/g++.dg/torture/pr91334.C
+++ b/gcc/testsuite/g++.dg/torture/pr91334.C
@@ -1,5 +1,6 @@ 
 /* PR c++/91334.  */
 /* { dg-do compile } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } } */
 
 #include <new>
 #include <stdlib.h>
diff --git a/gcc/testsuite/g++.dg/torture/pr91606.C b/gcc/testsuite/g++.dg/torture/pr91606.C
index 37a05a5e3a5fa..385c20c5da5b3 100644
--- a/gcc/testsuite/g++.dg/torture/pr91606.C
+++ b/gcc/testsuite/g++.dg/torture/pr91606.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-additional-options "-fstrict-aliasing" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib size_t" { ! hostedlib } } */
 
 #include <cstdlib>
 #include <array>
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/copyprop.C b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
index bc9167ad1201f..f94c7c6201c53 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/copyprop.C
@@ -3,6 +3,7 @@ 
 // { dg-do compile { target { lp64 } } }
 // { dg-options  "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate  -finline-limit=500 -std=c++98"  }
 // { dg-additional-options "-Wno-return-type" }
+// { dg-skip-if "requires hosted libstdc++ for map" { ! hostedlib } }
 
 #include <map>
 #include <vector>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C b/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C
index dca7868f3c96c..ed4a603bf5b33 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/initlist-opt5.C b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt5.C
index fc928bb540501..3126fe0ed8ae7 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt5.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt5.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 } }
 
 // Check that we call the basic_string constructor once (and define it once).
 // { dg-final { scan-tree-dump-times {>::basic_string} 2 "gimple" } }
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..08329144e8f57 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/loop-split-1.C b/gcc/testsuite/g++.dg/tree-ssa/loop-split-1.C
index 9581438b5364c..898100653348b 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/loop-split-1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/loop-split-1.C
@@ -1,5 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -fdump-tree-lsplit-details -std=c++11" } */
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
+
 #include <vector>
 #include <cmath>
 
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/pr102216-2.C b/gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C
index 8d351a9bad08d..a49f180eb7bb8 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr102216-2.C
@@ -1,4 +1,6 @@ 
 /* { dg-options "-O2 -Wall" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstddef NULL" { ! hostedlib } } */
+
 #include <algorithm>
 
 static inline bool
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/pr109849.C b/gcc/testsuite/g++.dg/tree-ssa/pr109849.C
index d06dbb1048294..f5ce0a6a02b3c 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr109849.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr109849.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-sra -fdump-tree-optimized" } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 #include <vector>
 typedef unsigned int uint32_t;
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr14703.C b/gcc/testsuite/g++.dg/tree-ssa/pr14703.C
index cf821a58aed7e..3e5484ec73dd9 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..5f0ca46856440 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/pr20458.C b/gcc/testsuite/g++.dg/tree-ssa/pr20458.C
index d4e7d1a1a86fa..9fd817a8f057e 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr20458.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr20458.C
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-skip-if "requires hosted libstdc++ for std::locale cdtor" { ! hostedlib } } */
 
 /* The tail call optimization would inapproriately tail call the 
    destructors due to not recognizing a call clobbered variable */
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..cd883f1b4f4ee 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..f8babd362a58d 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/uninit-pr105937.C b/gcc/testsuite/g++.dg/uninit-pr105937.C
index 26b4f74c5e1e4..744817b1ba855 100644
--- a/gcc/testsuite/g++.dg/uninit-pr105937.C
+++ b/gcc/testsuite/g++.dg/uninit-pr105937.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 cwchar" { ! hostedlib } }
 
 #include <stdint.h>
 #include <optional>
diff --git a/gcc/testsuite/g++.dg/vect/pr102421.cc b/gcc/testsuite/g++.dg/vect/pr102421.cc
index ccab6955c677d..c8d3c741e732f 100644
--- a/gcc/testsuite/g++.dg/vect/pr102421.cc
+++ b/gcc/testsuite/g++.dg/vect/pr102421.cc
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-additional-options "-O3" } */
 /* { dg-additional-options "-march=armv8.2-a+sve" { target aarch64-*-* } } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 #include <vector>
 
diff --git a/gcc/testsuite/g++.dg/vect/pr105053.cc b/gcc/testsuite/g++.dg/vect/pr105053.cc
index 6deef8458fc85..142cd0c1ced52 100644
--- a/gcc/testsuite/g++.dg/vect/pr105053.cc
+++ b/gcc/testsuite/g++.dg/vect/pr105053.cc
@@ -1,5 +1,6 @@ 
 // { dg-require-effective-target c++11 }
 // { dg-require-effective-target int32plus }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 #include <tuple>
diff --git a/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc
index a0da5cf0aabcc..26736ce3f3293 100644
--- a/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc
+++ b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc
@@ -2,6 +2,7 @@ 
 /* { dg-require-effective-target vect_int } */
 /* { dg-require-effective-target vect_int_mult } */
 /* { dg-additional-options "-std=c++11 -O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 /* PR other/33426 */
 /* Testing whether #pragma ivdep is working.  */
diff --git a/gcc/testsuite/g++.dg/vect/pr64410.cc b/gcc/testsuite/g++.dg/vect/pr64410.cc
index ad4b085b5e050..407b893da4b8a 100644
--- a/gcc/testsuite/g++.dg/vect/pr64410.cc
+++ b/gcc/testsuite/g++.dg/vect/pr64410.cc
@@ -1,6 +1,7 @@ 
 // { dg-do compile }
 // { dg-require-effective-target vect_double }
 // { dg-additional-options "-fexcess-precision=fast" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 #include <complex>
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr87105.cc b/gcc/testsuite/g++.dg/vect/slp-pr87105.cc
index 17017686792b3..b4cb16a14bfda 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr87105.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr87105.cc
@@ -3,6 +3,7 @@ 
 // { dg-require-effective-target vect_double }
 // For MIN/MAX recognition
 // { dg-additional-options "-ffast-math" }
+// { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } }
 
 #include <algorithm>
 #include <cmath>
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr98855.cc b/gcc/testsuite/g++.dg/vect/slp-pr98855.cc
index e0527c492d573..9b95a8d8948e6 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr98855.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr98855.cc
@@ -1,5 +1,6 @@ 
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-additional-options "-fvect-cost-model=cheap -mavx2" }
+// { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } }
 
 #include <stdint.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/g++.dg/vect/vect-novector-pragma.cc b/gcc/testsuite/g++.dg/vect/vect-novector-pragma.cc
index 8c6ff22fcaaba..3e5b42bcf1a23 100644
--- a/gcc/testsuite/g++.dg/vect/vect-novector-pragma.cc
+++ b/gcc/testsuite/g++.dg/vect/vect-novector-pragma.cc
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 #include <vector>
 
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-reference14.C b/gcc/testsuite/g++.dg/warn/Wdangling-reference14.C
index 92b38a965e0a7..b83266ee6a808 100644
--- a/gcc/testsuite/g++.dg/warn/Wdangling-reference14.C
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-reference14.C
@@ -1,6 +1,7 @@ 
 // PR c++/113256
 // { dg-do compile { target c++14 } }
 // { dg-options "-Wdangling-reference" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
 
 #include <utility>
 #include <cassert>
diff --git a/gcc/testsuite/g++.dg/warn/Wdangling-reference17.C b/gcc/testsuite/g++.dg/warn/Wdangling-reference17.C
index 8cda5dea4447c..f7b666dc2e907 100644
--- a/gcc/testsuite/g++.dg/warn/Wdangling-reference17.C
+++ b/gcc/testsuite/g++.dg/warn/Wdangling-reference17.C
@@ -1,6 +1,7 @@ 
 // PR c++/111410
 // { dg-do compile { target c++20 } }
 // { dg-options "-Wdangling-reference" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 #include <ranges>
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/Wparentheses-34.C b/gcc/testsuite/g++.dg/warn/Wparentheses-34.C
index 2100c8a193d22..91095695ea2ca 100644
--- a/gcc/testsuite/g++.dg/warn/Wparentheses-34.C
+++ b/gcc/testsuite/g++.dg/warn/Wparentheses-34.C
@@ -2,6 +2,7 @@ 
 // such as std::vector<bool>'s reference type the same as ordinary
 // bool.
 // { dg-additional-options "-Wparentheses" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
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..9cb344cdac7d4 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..9d4f827c4394d 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/Wsystem-headers1a.C b/gcc/testsuite/g++.dg/warn/Wsystem-headers1a.C
index 68f6ea15f8d62..c44d6a91c20ef 100644
--- a/gcc/testsuite/g++.dg/warn/Wsystem-headers1a.C
+++ b/gcc/testsuite/g++.dg/warn/Wsystem-headers1a.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile { target *-*-*gnu } }
 // { dg-options "-Wsystem-headers" }
+// { dg-skip-if "requires hosted libstdc++ for stdlib atof" { ! hostedlib } }
 
 #include <stdlib.h>
 
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/Wuninitialized-pr111123-1.C b/gcc/testsuite/g++.dg/warn/Wuninitialized-pr111123-1.C
index 17a6f2b28d88d..4d3c44774b573 100644
--- a/gcc/testsuite/g++.dg/warn/Wuninitialized-pr111123-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wuninitialized-pr111123-1.C
@@ -1,6 +1,7 @@ 
 // { dg-do compile }
 // { dg-require-effective-target c++11 }
 // { dg-options "-O -Wuninitialized" }
+// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
 
 #include <vector>
 
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/huge-val1.C b/gcc/testsuite/g++.dg/warn/huge-val1.C
index 2ddfae0c9c683..c480cf32f353a 100644
--- a/gcc/testsuite/g++.dg/warn/huge-val1.C
+++ b/gcc/testsuite/g++.dg/warn/huge-val1.C
@@ -2,6 +2,7 @@ 
 // Origin: Joseph Myers <joseph@codesourcery.com>
 // { dg-do link }
 // { dg-options "-pedantic-errors" }
+// { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } }
 
 #include <math.h>
 
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++.abi/arraynew.C b/gcc/testsuite/g++.old-deja/g++.abi/arraynew.C
index 2e11caecff6f5..05b6686c0f270 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/arraynew.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/arraynew.C
@@ -2,6 +2,7 @@ 
 // Origin: Mark Mitchell <mark@codesourcery.com>
 // Avoid use of none-overridable new/delete operators in shared
 // { dg-options "-static" { target *-*-mingw* } }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib size_t" { ! hostedlib } } */
 
 #if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
 
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
index de647c4eb69d8..2d1a08ed9a09f 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
@@ -7,6 +7,8 @@ 
 // { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
 // Avoid use of non-overridable new/delete operators in shared
 // { dg-options "-static" { target *-*-mingw* } }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // Test __cxa_vec routines
 // Copyright (C) 2000, 2005 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 7 Apr 2000 <nathan@nathan@codesourcery.com>
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/new3.C b/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
index cc716d5c38fc8..3ae4439eff112 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
@@ -7,6 +7,8 @@ 
 // { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
 // Avoid use of none-overridable new/delete operators in shared
 // { dg-options "-static" { target *-*-mingw* } }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // GROUPS passed operator-new
 #include <stdio.h>
 #include <stdlib.h>
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++.eh/new1.C b/gcc/testsuite/g++.old-deja/g++.eh/new1.C
index 929188f6dcab9..5020a6bb58c72 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/new1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/new1.C
@@ -2,6 +2,7 @@ 
 // Test that a throw in foo destroys the A, but does not free the memory.
 // Avoid use of none-overridable new/delete operators in shared
 // { dg-options "-static" { target *-*-mingw* } }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
 
 #include <cstddef>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/new2.C b/gcc/testsuite/g++.old-deja/g++.eh/new2.C
index 563a7949e44f5..42382f3a8c0b2 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/new2.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/new2.C
@@ -3,6 +3,7 @@ 
 // Avoid use of none-overridable new/delete operators in shared
 // { dg-options "-static" { target *-*-mingw* } }
 // { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <cstddef>
 #include <cstdlib>
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/2371.C b/gcc/testsuite/g++.old-deja/g++.jason/2371.C
index c4263d6a4fb5f..052fd4e1c2064 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/2371.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/2371.C
@@ -1,5 +1,6 @@ 
 // { dg-do run  }
 // { dg-options "" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
 # 1 "SetLS.cc"
 // GROUPS passed templates nested-classes
 //
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/template44.C b/gcc/testsuite/g++.old-deja/g++.jason/template44.C
index 2aea33a5e0555..72da26eb39e4f 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/template44.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template44.C
@@ -1,4 +1,6 @@ 
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for stdlib qsort" { ! hostedlib } }
+
 #include <stdlib.h>
 #include <string.h>
 
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/arm13.C b/gcc/testsuite/g++.old-deja/g++.law/arm13.C
index f1393c6e39bce..66952dde3b7cf 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm13.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm13.C
@@ -1,4 +1,6 @@ 
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // GROUPS passed ARM-compliance
 #include <stdio.h>
 #include <stdlib.h>
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/scope2.C b/gcc/testsuite/g++.old-deja/g++.law/scope2.C
index 13c02c2ae0ff9..af1892e1abc56 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/scope2.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/scope2.C
@@ -1,4 +1,6 @@ 
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } }
+
 // GROUPS passed scoping
 // scoping file
 // From: svkakkad@cs.utexas.edu (Sheetal V. Kakkad)
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++.law/weak.C b/gcc/testsuite/g++.old-deja/g++.law/weak.C
index 52444e77946dc..c751af6ae2b4d 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/weak.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/weak.C
@@ -1,6 +1,8 @@ 
 // { dg-do link { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } }
 // { dg-require-effective-target static }
 // { dg-options "-static" }
+// { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
+
 // Bug: g++ fails to instantiate operator<<.
 
 // libc-5.4.xx has __IO_putc in its static C library, which can conflict
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/eh47.C b/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
index 36d3b9db3298e..0b99a9f34e2d3 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
@@ -1,5 +1,6 @@ 
 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
 // { dg-options "-fexceptions" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib exit" { ! hostedlib } }
 
 #include <cstdlib>
 #include <exception>
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/ns15.C b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C
index b4cf044a80b46..5b3607fb03dd9 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns15.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/ns15.C
@@ -1,6 +1,7 @@ 
 // { dg-do assemble }
 // { dg-xfail-if "" { xstormy16-*-* } }
 // { dg-require-effective-target size20plus }
+// { dg-skip-if "requires hosted libstdc++ for stdlib qsort" { ! hostedlib } }
 
 #include <stdio.h>
 #include <stdlib.h>
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/p710.C b/gcc/testsuite/g++.old-deja/g++.mike/p710.C
index 7fdd5b0223815..3756a5e76e1d6 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p710.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p710.C
@@ -1,4 +1,6 @@ 
 // { dg-do assemble  }
+// { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } }
+
 // GROUPS passed delete
 /*
   Bug Id: 
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p9706.C b/gcc/testsuite/g++.old-deja/g++.mike/p9706.C
index 0ed15e4c85c18..7a4c05f44ddba 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p9706.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p9706.C
@@ -1,5 +1,6 @@ 
 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
 // { dg-options "-fexceptions" }
+// { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } }
 // prms-id: 9706
 
 #include <stdlib.h>
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++.oliva/new1.C b/gcc/testsuite/g++.old-deja/g++.oliva/new1.C
index 86d25f8e6f35a..3b6af27cb8bf0 100644
--- a/gcc/testsuite/g++.old-deja/g++.oliva/new1.C
+++ b/gcc/testsuite/g++.old-deja/g++.oliva/new1.C
@@ -1,4 +1,6 @@ 
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } }
+
 // Copyright (C) 1999 Free Software Foundation
 
 // by Alexandre Oliva <oliva@dcc.unicamp.br>
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/delete8.C b/gcc/testsuite/g++.old-deja/g++.other/delete8.C
index ea44445b0b6c0..b3b374da5ba5a 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/delete8.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/delete8.C
@@ -1,4 +1,6 @@ 
 // { dg-do run  }
+// { dg-skip-if "requires hosted libstdc++ for stdlib size_t" { ! hostedlib } }
+
 // Origin: Mark Mitchell <mark@codesourcery.com>
 
 #include <stdlib.h>
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/g++.target/i386/avx-pr54700-1.C b/gcc/testsuite/g++.target/i386/avx-pr54700-1.C
index ef696886ce67f..9037650aa4331 100644
--- a/gcc/testsuite/g++.target/i386/avx-pr54700-1.C
+++ b/gcc/testsuite/g++.target/i386/avx-pr54700-1.C
@@ -5,5 +5,6 @@ 
 /* { dg-final { scan-assembler-times "vpblendvb" 2 } } */
 /* { dg-final { scan-assembler-times "vblendvps" 4 } } */
 /* { dg-final { scan-assembler-times "vblendvpd" 4 } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include "sse4_1-pr54700-1.C"
diff --git a/gcc/testsuite/g++.target/i386/avx-pr54700-2.C b/gcc/testsuite/g++.target/i386/avx-pr54700-2.C
index e3556f312179b..251b95084b454 100644
--- a/gcc/testsuite/g++.target/i386/avx-pr54700-2.C
+++ b/gcc/testsuite/g++.target/i386/avx-pr54700-2.C
@@ -1,6 +1,7 @@ 
 /* PR target/54700 */
 /* { dg-do run { target avx } } */
 /* { dg-options "-O2 -std=c++14 -mavx -mno-xop -mno-avx2" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/g++.target/i386/avx2-pr54700-1.C b/gcc/testsuite/g++.target/i386/avx2-pr54700-1.C
index b685c2aa28bb8..99050c635d54c 100644
--- a/gcc/testsuite/g++.target/i386/avx2-pr54700-1.C
+++ b/gcc/testsuite/g++.target/i386/avx2-pr54700-1.C
@@ -5,6 +5,7 @@ 
 /* { dg-final { scan-assembler-times "vpblendvb" 2 } } */
 /* { dg-final { scan-assembler-times "vblendvps" 4 } } */
 /* { dg-final { scan-assembler-times "vblendvpd" 4 } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <x86intrin.h>
 
diff --git a/gcc/testsuite/g++.target/i386/avx2-pr54700-2.C b/gcc/testsuite/g++.target/i386/avx2-pr54700-2.C
index e7a85c34b175b..0845d4af5eb55 100644
--- a/gcc/testsuite/g++.target/i386/avx2-pr54700-2.C
+++ b/gcc/testsuite/g++.target/i386/avx2-pr54700-2.C
@@ -1,6 +1,7 @@ 
 /* PR target/54700 */
 /* { dg-do run { target avx2 } } */
 /* { dg-options "-O2 -std=c++14 -mavx2 -mno-xop -mno-avx512f" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx2-check.h"
diff --git a/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
index 30a1b95957309..126d4d247163d 100644
--- a/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
+++ b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-2.C
@@ -2,6 +2,7 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target avx512bw } */
 /* { dg-options "-O2 -std=c++14 -mavx512bw" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #define AVX512BW
 
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1a.C b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1a.C
index fedc3aad0190e..e03d86482fb0c 100644
--- a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1a.C
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1a.C
@@ -5,5 +5,6 @@ 
 /* { dg-final { scan-assembler-times "vpblendvb" 2 } } */
 /* { dg-final { scan-assembler-times "vblendvps" 4 } } */
 /* { dg-final { scan-assembler-times "vblendvpd" 4 } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include "avx2-pr54700-1.C"
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1b.C b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1b.C
index 03f9343565056..1259f28d55d8a 100644
--- a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1b.C
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-1b.C
@@ -5,5 +5,6 @@ 
 /* { dg-final { scan-assembler-times "pblendvb" 2 } } */
 /* { dg-final { scan-assembler-times "blendvps" 4 } } */
 /* { dg-final { scan-assembler-times "blendvpd" 4 } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include "sse4_1-pr54700-1.C"
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2a.C b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2a.C
index 687a8c4fd8f02..b58d5f53c315d 100644
--- a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2a.C
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2a.C
@@ -1,6 +1,7 @@ 
 /* PR target/100648  */
 /* { dg-do run { target avx2 } } */
 /* { dg-options "-O2 -std=c++14 -mavx2 -mavx512vl -mavx512bw" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx512f-helper.h"
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2b.C b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2b.C
index 40450a90c52bd..f184d25fa1466 100644
--- a/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2b.C
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr54700-2b.C
@@ -1,6 +1,7 @@ 
 /* PR target/pr100648 */
 /* { dg-do run { target sse4 } } */
 /* { dg-options "-O2 -std=c++14 -msse4 -mavx512vl -mavx512bw -mno-xop" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx512f-helper.h"
diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
index db9dce2caefba..5ac756d96f6a3 100644
--- a/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
+++ b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-2.C
@@ -3,6 +3,7 @@ 
 /* { dg-require-effective-target avx512bw } */
 /* { dg-require-effective-target avx512vl } */
 /* { dg-options "-O2 -std=c++14 -mavx512bw -mavx512vl" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #define AVX512VL
 #define AVX512BW
diff --git a/gcc/testsuite/g++.target/i386/mvc4.C b/gcc/testsuite/g++.target/i386/mvc4.C
index 68df5e3e4d0ca..fd8c3e381c9a0 100644
--- a/gcc/testsuite/g++.target/i386/mvc4.C
+++ b/gcc/testsuite/g++.target/i386/mvc4.C
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-require-ifunc "" } */
 /* { dg-options "-mavx" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <immintrin.h>
 
diff --git a/gcc/testsuite/g++.target/i386/pr100885.C b/gcc/testsuite/g++.target/i386/pr100885.C
index bec08f7e96d0b..c09f743ee1fd0 100644
--- a/gcc/testsuite/g++.target/i386/pr100885.C
+++ b/gcc/testsuite/g++.target/i386/pr100885.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target { ! ia32 } } } */
 /* { dg-options "-mavx512vl -mno-avx512bw -O2 -Wno-int-to-pointer-cast -std=c++14" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include<x86intrin.h>
 typedef unsigned char byte;
diff --git a/gcc/testsuite/g++.target/i386/pr102166.C b/gcc/testsuite/g++.target/i386/pr102166.C
index 751cd2c6d26fd..f26a60ce56e81 100644
--- a/gcc/testsuite/g++.target/i386/pr102166.C
+++ b/gcc/testsuite/g++.target/i386/pr102166.C
@@ -1,6 +1,7 @@ 
 /* PR target/102166 */
 /* { dg-do compile { target { ! ia32 } } } */
 /* { dg-options "-O2 -std=c++14" } */
+/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
 
 #include<immintrin.h>
 __attribute__((target("amx-tile"))) void amx()
diff --git a/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C b/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C
index 26987d307aa65..922e33e2c636f 100644
--- a/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C
+++ b/gcc/testsuite/g++.target/i386/pr103750-fwprop-1.C
@@ -2,6 +2,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -std=c++1y -march=cannonlake -fdump-rtl-fwprop1" } */
 /* { dg-final { scan-rtl-dump-not "subreg:HI\[ \\\(\]*reg:SI\[^\n]*\n\[^\n]*UNSPEC_TZCNT" "fwprop1" } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include<immintrin.h>
 const char16_t *qustrchr(char16_t *n, char16_t *e, char16_t c) noexcept
diff --git a/gcc/testsuite/g++.target/i386/pr105593.C b/gcc/testsuite/g++.target/i386/pr105593.C
index 3897f706bb11c..aef1adbcf46df 100644
--- a/gcc/testsuite/g++.target/i386/pr105593.C
+++ b/gcc/testsuite/g++.target/i386/pr105593.C
@@ -1,6 +1,7 @@ 
 // PR c++/105593
 // { dg-do compile { target c++14 } }
 // { dg-options "-mavx512fp16 -W -Wall -O2" }
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <x86intrin.h>
 
diff --git a/gcc/testsuite/g++.target/i386/pr105638.C b/gcc/testsuite/g++.target/i386/pr105638.C
index c8770933b7c15..b91301ba47cef 100644
--- a/gcc/testsuite/g++.target/i386/pr105638.C
+++ b/gcc/testsuite/g++.target/i386/pr105638.C
@@ -1,6 +1,7 @@ 
 /* { dg-do compile { target { ! ia32 } } } */
 /* { dg-options "-std=gnu++20 -O2 -march=skylake" } */
 /* { dg-final { scan-assembler-not "call\[\\t \]_?memset\[\r\n\]\[^\r\n\]movq\[\\t \]%\[a-z0-9]*, %\[a-z0-9]*\[\r\n\]\[^\r\n\]vpxor\[\\t \]%xmm0, %xmm0, %xmm0\[\r\n\]\[^\r\n\]vmovdqu\[\\t \]%xmm0, 36\\(%rax\\)" } } */
+/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */
 
 
 #include <stdint.h>
diff --git a/gcc/testsuite/g++.target/i386/pr110170.C b/gcc/testsuite/g++.target/i386/pr110170.C
index 21cca8f380527..d2d8811b13d79 100644
--- a/gcc/testsuite/g++.target/i386/pr110170.C
+++ b/gcc/testsuite/g++.target/i386/pr110170.C
@@ -1,5 +1,7 @@ 
 /* { dg-do run { target sse4 } } */
 /* { dg-options " -O2 -msse4.1 -mfpmath=sse -std=gnu++20" } */
+/* { dg-skip-if "requires hosted libstdc++ for cmath" { ! hostedlib } } */
+
 #include <math.h>
 
 #ifndef CHECK_H
diff --git a/gcc/testsuite/g++.target/i386/pr112443.C b/gcc/testsuite/g++.target/i386/pr112443.C
index ebfa9b4a753b7..7a47ceaf632ee 100644
--- a/gcc/testsuite/g++.target/i386/pr112443.C
+++ b/gcc/testsuite/g++.target/i386/pr112443.C
@@ -2,6 +2,7 @@ 
 /* { dg-require-effective-target avx512bw } */
 /* { dg-require-effective-target avx512vl } */
 /* { dg-options "-O2 -std=c++17 -mavx512bw -mavx512vl" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <cstdint>
 #include <x86intrin.h>
diff --git a/gcc/testsuite/g++.target/i386/pr113560.C b/gcc/testsuite/g++.target/i386/pr113560.C
index 179b68f9833fe..c4a1ccf41c43c 100644
--- a/gcc/testsuite/g++.target/i386/pr113560.C
+++ b/gcc/testsuite/g++.target/i386/pr113560.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target { ! ia32 } } } */
 /* { dg-options "-Ofast -std=c++23 -march=znver4" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <immintrin.h>
 auto f(char *buf, unsigned long long in) noexcept
diff --git a/gcc/testsuite/g++.target/i386/pr80566-1.C b/gcc/testsuite/g++.target/i386/pr80566-1.C
index 29da31d6bb623..2a8031c46bd6a 100644
--- a/gcc/testsuite/g++.target/i386/pr80566-1.C
+++ b/gcc/testsuite/g++.target/i386/pr80566-1.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile }
 // { dg-options "-O2 -march=haswell -mtune-ctrl=avx256_store_by_pieces" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 
diff --git a/gcc/testsuite/g++.target/i386/pr80566-2.C b/gcc/testsuite/g++.target/i386/pr80566-2.C
index 9ffd2c8cadb83..9f09c9d8de8fd 100644
--- a/gcc/testsuite/g++.target/i386/pr80566-2.C
+++ b/gcc/testsuite/g++.target/i386/pr80566-2.C
@@ -1,5 +1,6 @@ 
 // { dg-do compile }
 // { dg-options "-O2 -march=haswell -mtune-ctrl=avx256_move_by_pieces" }
+// { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } }
 
 #include <cstring>
 
diff --git a/gcc/testsuite/g++.target/i386/pr88152.C b/gcc/testsuite/g++.target/i386/pr88152.C
index 9f1659b75868c..a0aed94e7acfd 100644
--- a/gcc/testsuite/g++.target/i386/pr88152.C
+++ b/gcc/testsuite/g++.target/i386/pr88152.C
@@ -8,6 +8,7 @@ 
 // { dg-final { scan-assembler-times "vmovmskpd\[^\n\r]*xmm" 4 } }
 // { dg-final { scan-assembler-times "vmovmskpd\[^\n\r]*ymm" 4 } }
 // { dg-final { scan-assembler-not "vpcmpgt|vpcmpeq|vpsra" } }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <x86intrin.h>
 
diff --git a/gcc/testsuite/g++.target/i386/pr88998.C b/gcc/testsuite/g++.target/i386/pr88998.C
index a338ad7964c10..a54132831426b 100644
--- a/gcc/testsuite/g++.target/i386/pr88998.C
+++ b/gcc/testsuite/g++.target/i386/pr88998.C
@@ -2,6 +2,7 @@ 
 // { dg-do run { target sse2_runtime } }
 // { dg-options "-O2 -msse2 -mfpmath=387" }
 // { dg-require-effective-target c++11 }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <cassert>
 #include <unordered_map>
diff --git a/gcc/testsuite/g++.target/i386/pr94046-1.C b/gcc/testsuite/g++.target/i386/pr94046-1.C
index f2d472442d766..708c9f8f3f0e2 100644
--- a/gcc/testsuite/g++.target/i386/pr94046-1.C
+++ b/gcc/testsuite/g++.target/i386/pr94046-1.C
@@ -1,6 +1,7 @@ 
 // PR target/94046
 // { dg-do compile }
 // { dg-options "-O2 -mavx2 -mxop" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include <x86intrin.h>
 
diff --git a/gcc/testsuite/g++.target/i386/pr94046-2.C b/gcc/testsuite/g++.target/i386/pr94046-2.C
index abc8c3ee1ec43..ba6678669d71c 100644
--- a/gcc/testsuite/g++.target/i386/pr94046-2.C
+++ b/gcc/testsuite/g++.target/i386/pr94046-2.C
@@ -1,5 +1,6 @@ 
 // PR target/94046
 // { dg-do compile }
 // { dg-options "-O0 -mavx2 -mxop" }
+// { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } }
 
 #include "pr94046-1.C"
diff --git a/gcc/testsuite/g++.target/i386/sse4_1-pr54700-1.C b/gcc/testsuite/g++.target/i386/sse4_1-pr54700-1.C
index 2b5cdb14b13a8..020da6964a449 100644
--- a/gcc/testsuite/g++.target/i386/sse4_1-pr54700-1.C
+++ b/gcc/testsuite/g++.target/i386/sse4_1-pr54700-1.C
@@ -5,6 +5,7 @@ 
 /* { dg-final { scan-assembler-times "pblendvb" 2 } } */
 /* { dg-final { scan-assembler-times "blendvps" 4 } } */
 /* { dg-final { scan-assembler-times "blendvpd" 4 } } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #include <x86intrin.h>
 
diff --git a/gcc/testsuite/g++.target/i386/sse4_1-pr54700-2.C b/gcc/testsuite/g++.target/i386/sse4_1-pr54700-2.C
index cef7d9764f8db..09e768fb2c92d 100644
--- a/gcc/testsuite/g++.target/i386/sse4_1-pr54700-2.C
+++ b/gcc/testsuite/g++.target/i386/sse4_1-pr54700-2.C
@@ -1,6 +1,7 @@ 
 /* PR target/54700 */
 /* { dg-do run { target sse4 } } */
 /* { dg-options "-O2 -std=c++14 -msse4 -mno-avx -mno-xop" } */
+/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d3569c80b6fed..34000653ab876 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 {