gcc/libstdc++-v3/testsuite
Jonathan Wakely b6b6600678 libstdc++: Fixes for tests that fail with -fno-rtti
This disables a use of dynamic_cast that is not valid for -fno-rtti and
adjusts some tests so they don't FAIL with -fno-rtti. Some tests are
skipped completely, and others just make use of typeid conditional on
the __cpp_rtti macro. A couple of tests were using typeid to verify
typedefs denote the right type, which can be done at compile-time using
templates instead.

libstdc++-v3/ChangeLog:

	* include/experimental/memory_resource [!__cpp_rtti]
	(__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
	when RTTI is disabled.
	* testsuite/17_intro/freestanding.cc: Require RTTI.
	* testsuite/18_support/exception/38732.cc: Likewise.
	* testsuite/18_support/exception_ptr/rethrow_exception.cc:
	Likewise.
	* testsuite/18_support/nested_exception/68139.cc: Likewise.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc:
	Likewise.
	* testsuite/18_support/type_info/103240.cc: Likewise.
	* testsuite/18_support/type_info/fundamental.cc: Likewise.
	* testsuite/18_support/type_info/hash_code.cc: Likewise.
	* testsuite/20_util/any/assign/emplace.cc: Likewise.
	* testsuite/20_util/any/cons/in_place.cc: Likewise.
	* testsuite/20_util/any/misc/any_cast.cc: Likewise.
	* testsuite/20_util/any/observers/type.cc: Likewise.
	* testsuite/20_util/function/1.cc: Likewise.
	* testsuite/20_util/function/2.cc: Likewise.
	* testsuite/20_util/function/3.cc: Likewise.
	* testsuite/20_util/function/4.cc: Likewise.
	* testsuite/20_util/function/5.cc: Likewise.
	* testsuite/20_util/function/6.cc: Likewise.
	* testsuite/20_util/function/7.cc: Likewise.
	* testsuite/20_util/function/8.cc: Likewise.
	* testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
	* testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
	* testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
	* testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
	* testsuite/20_util/typeindex/comparison_operators_c++20.cc:
	Likewise.
	* testsuite/20_util/typeindex/hash.cc: Likewise.
	* testsuite/20_util/typeindex/hash_code.cc: Likewise.
	* testsuite/20_util/typeindex/name.cc: Likewise.
	* testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
	* testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
	Likewise.
	* testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
	Likewise.
	* testsuite/22_locale/locale/13630.cc: Check type without using
	RTTI.
	* testsuite/23_containers/array/requirements/non_default_constructible.cc:
	Require RTTI.
	* testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
	* testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
	* testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
	* testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
	* testsuite/experimental/any/misc/any_cast.cc: Likewise.
	* testsuite/experimental/any/observers/type.cc: Likewise.
	* testsuite/experimental/memory_resource/resource_adaptor.cc:
	Likewise.
	* testsuite/lib/libstdc++.exp (check_effective_target_rtti):
	Define new proc.
	* testsuite/tr1/3_function_objects/function/1.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/2.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/3.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/4.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/5.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/6.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/7.cc: Likewise.
	* testsuite/tr1/3_function_objects/function/8.cc: Likewise.
	* testsuite/tr2/bases/value.cc: Likewise.
	* testsuite/tr2/direct_bases/value.cc: Likewise.
	* testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
	types without RTTI.
2022-05-05 21:13:58 +01:00
..
17_intro libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
18_support libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
19_diagnostics libstdc++: Reduce memory usage in std::stacktrace::current 2022-04-12 22:38:31 +01:00
20_util libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
21_strings libstdc++: Fix macro checked by test 2022-04-20 13:54:57 +01:00
22_locale libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
23_containers libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
24_iterators libstdc++: Avoid overflow in ranges::advance(i, n, bound) 2022-01-27 22:24:29 +00:00
25_algorithms libstdc++: Avoid double-deref of __first in ranges::minmax [PR104858] 2022-04-15 14:41:14 -04:00
26_numerics libstdc++: Add missing constraints to std::bit_cast [PR105027] 2022-03-23 12:17:16 +00:00
27_io libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
28_regex libstdc++: Add dg-timeout-factor to some more regex tests 2022-01-10 12:18:14 +00:00
29_atomics libstdc++: Make atomic notify_one and notify_all non-const 2022-04-22 15:53:41 -07:00
30_threads libstdc++: Add deduction guides for std::packaged_task [PR105375] 2022-04-25 16:16:33 +01:00
abi Update copyright years. 2022-01-03 10:42:10 +01:00
backward Update copyright years. 2022-01-03 10:42:10 +01:00
config Update copyright years. 2022-01-03 10:42:10 +01:00
data
decimal Update copyright years. 2022-01-03 10:42:10 +01:00
experimental libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
ext libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
lib libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
libstdc++-abi Update copyright years. 2022-01-03 10:42:10 +01:00
libstdc++-dg Update copyright years. 2022-01-03 10:42:10 +01:00
libstdc++-prettyprinters libstdc++: Add pretty printer for std::atomic 2022-04-27 15:48:32 +01:00
libstdc++-xmethods Update copyright years. 2022-01-03 10:42:10 +01:00
performance libstdc++: Optimize operations on small size hashtable [PR 68303] 2022-01-05 21:46:52 +01:00
special_functions Update copyright years. 2022-01-03 10:42:10 +01:00
std libstdc++: Reduce header dependencies from PSTL headers [PR92546] 2022-03-18 10:16:36 +00:00
tr1 libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
tr2 libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
util libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
Makefile.am Update copyright years. 2022-01-03 10:42:10 +01:00
Makefile.in libstdc++: Define <stacktrace> header for C++23 2022-01-17 12:13:02 +00:00