gcc/libstdc++-v3/testsuite/util
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
..
atomic Update copyright years. 2022-01-03 10:42:10 +01:00
common_type Update copyright years. 2022-01-03 10:42:10 +01:00
debug Update copyright years. 2022-01-03 10:42:10 +01:00
exception libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
hash_fn Update copyright years. 2022-01-03 10:42:10 +01:00
io Update copyright years. 2022-01-03 10:42:10 +01:00
native_type Update copyright years. 2022-01-03 10:42:10 +01:00
performance Update copyright years. 2022-01-03 10:42:10 +01:00
pstl libstdc++: Fix some problems in PSTL tests 2021-05-12 14:51:15 +01:00
regression libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
statistic Update copyright years. 2022-01-03 10:42:10 +01:00
thread Update copyright years. 2022-01-03 10:42:10 +01:00
replacement_memory_operators.h Update copyright years. 2022-01-03 10:42:10 +01:00
slow_clock.h Update copyright years. 2022-01-03 10:42:10 +01:00
specfun_testcase.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_abi_check.cc Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_abi.cc libstdc++: Fix symbol versioning for Solaris 11.3 [PR103407] 2022-03-16 21:16:53 +00:00
testsuite_abi.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_allocator.cc Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_allocator.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_api.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_character.cc Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_character.h libstdc++: Fix comment in testsuite utility 2022-03-17 12:23:56 +00:00
testsuite_common_types.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_container_traits.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_containergen.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_containers.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_counter_type.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_error.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_fs.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_greedy_ops.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_hooks.cc Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_hooks.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_io.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_iterators.h libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
testsuite_new_operators.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_performance.h libstdc++: Optimize operations on small size hashtable [PR 68303] 2022-01-05 21:46:52 +01:00
testsuite_random.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_regex.h libstdc++: Reduce template instantiations in <regex> 2022-01-05 13:47:01 +00:00
testsuite_rng.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_rvalref.h Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_shared.cc Update copyright years. 2022-01-03 10:42:10 +01:00
testsuite_tr1.h Update copyright years. 2022-01-03 10:42:10 +01:00