gcc/libstdc++-v3/testsuite/20_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
..
add_const Update copyright years. 2022-01-03 10:42:10 +01:00
add_cv Update copyright years. 2022-01-03 10:42:10 +01:00
add_lvalue_reference Update copyright years. 2022-01-03 10:42:10 +01:00
add_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
add_rvalue_reference Update copyright years. 2022-01-03 10:42:10 +01:00
add_volatile Update copyright years. 2022-01-03 10:42:10 +01:00
addressof Update copyright years. 2022-01-03 10:42:10 +01:00
align Update copyright years. 2022-01-03 10:42:10 +01:00
aligned_storage Update copyright years. 2022-01-03 10:42:10 +01:00
aligned_union Update copyright years. 2022-01-03 10:42:10 +01:00
alignment_of Update copyright years. 2022-01-03 10:42:10 +01:00
allocator libstdc++: Ignore cv-quals when std::allocator<void> constructs 2022-01-14 10:14:25 +00:00
allocator_traits Update copyright years. 2022-01-03 10:42:10 +01:00
any libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
as_const Update copyright years. 2022-01-03 10:42:10 +01:00
assume_aligned Update copyright years. 2022-01-03 10:42:10 +01:00
auto_ptr Update copyright years. 2022-01-03 10:42:10 +01:00
bad_function_call Update copyright years. 2022-01-03 10:42:10 +01:00
bind Update copyright years. 2022-01-03 10:42:10 +01:00
bool_constant Update copyright years. 2022-01-03 10:42:10 +01:00
common_reference Update copyright years. 2022-01-03 10:42:10 +01:00
common_type/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
conditional/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
decay/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
declval/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
default_delete Update copyright years. 2022-01-03 10:42:10 +01:00
duration Update copyright years. 2022-01-03 10:42:10 +01:00
duration_cast Update copyright years. 2022-01-03 10:42:10 +01:00
enable_if/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
enable_shared_from_this Update copyright years. 2022-01-03 10:42:10 +01:00
exchange Update copyright years. 2022-01-03 10:42:10 +01:00
expected libstdc++: Fix constraints on std::expected<void, E> constructor [PR105153] 2022-04-08 18:30:07 +01:00
extent Update copyright years. 2022-01-03 10:42:10 +01:00
forward Update copyright years. 2022-01-03 10:42:10 +01:00
from_chars [PR105324] libstdc++: testsuite: pr105324 requires FP from_char 2022-05-03 14:57:15 -03:00
function libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
function_objects libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
has_unique_object_representations Update copyright years. 2022-01-03 10:42:10 +01:00
has_virtual_destructor Update copyright years. 2022-01-03 10:42:10 +01:00
hash Update copyright years. 2022-01-03 10:42:10 +01:00
headers Update copyright years. 2022-01-03 10:42:10 +01:00
in_place Update copyright years. 2022-01-03 10:42:10 +01:00
integer_comparisons Update copyright years. 2022-01-03 10:42:10 +01:00
integer_sequence Update copyright years. 2022-01-03 10:42:10 +01:00
integral_constant Update copyright years. 2022-01-03 10:42:10 +01:00
invoke_result Update copyright years. 2022-01-03 10:42:10 +01:00
is_abstract Update copyright years. 2022-01-03 10:42:10 +01:00
is_aggregate Update copyright years. 2022-01-03 10:42:10 +01:00
is_arithmetic Update copyright years. 2022-01-03 10:42:10 +01:00
is_array Update copyright years. 2022-01-03 10:42:10 +01:00
is_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_base_of Update copyright years. 2022-01-03 10:42:10 +01:00
is_bounded_array Update copyright years. 2022-01-03 10:42:10 +01:00
is_class Update copyright years. 2022-01-03 10:42:10 +01:00
is_complete_or_unbounded Update copyright years. 2022-01-03 10:42:10 +01:00
is_compound Update copyright years. 2022-01-03 10:42:10 +01:00
is_const Update copyright years. 2022-01-03 10:42:10 +01:00
is_constant_evaluated Update copyright years. 2022-01-03 10:42:10 +01:00
is_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_convertible Update copyright years. 2022-01-03 10:42:10 +01:00
is_copy_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_copy_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_default_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_destructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_empty Update copyright years. 2022-01-03 10:42:10 +01:00
is_enum Update copyright years. 2022-01-03 10:42:10 +01:00
is_final Update copyright years. 2022-01-03 10:42:10 +01:00
is_floating_point Update copyright years. 2022-01-03 10:42:10 +01:00
is_function Update copyright years. 2022-01-03 10:42:10 +01:00
is_fundamental Update copyright years. 2022-01-03 10:42:10 +01:00
is_implicitly_default_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_integral Update copyright years. 2022-01-03 10:42:10 +01:00
is_invocable Update copyright years. 2022-01-03 10:42:10 +01:00
is_layout_compatible libstdc++: Fix test for feature test macro 2021-10-14 09:08:01 +01:00
is_literal_type Update copyright years. 2022-01-03 10:42:10 +01:00
is_lvalue_reference Update copyright years. 2022-01-03 10:42:10 +01:00
is_member_function_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
is_member_object_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
is_member_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
is_move_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_move_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_convertible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_copy_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_copy_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_default_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_destructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_invocable Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_move_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_move_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_swappable Update copyright years. 2022-01-03 10:42:10 +01:00
is_nothrow_swappable_with Update copyright years. 2022-01-03 10:42:10 +01:00
is_null_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
is_object Update copyright years. 2022-01-03 10:42:10 +01:00
is_pod Update copyright years. 2022-01-03 10:42:10 +01:00
is_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
is_pointer_interconvertible
is_polymorphic Update copyright years. 2022-01-03 10:42:10 +01:00
is_reference Update copyright years. 2022-01-03 10:42:10 +01:00
is_rvalue_reference Update copyright years. 2022-01-03 10:42:10 +01:00
is_same Update copyright years. 2022-01-03 10:42:10 +01:00
is_scalar Update copyright years. 2022-01-03 10:42:10 +01:00
is_scoped_enum Update copyright years. 2022-01-03 10:42:10 +01:00
is_signed Update copyright years. 2022-01-03 10:42:10 +01:00
is_standard_layout Update copyright years. 2022-01-03 10:42:10 +01:00
is_swappable Update copyright years. 2022-01-03 10:42:10 +01:00
is_swappable_with Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivial Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_copy_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_copy_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_copyable Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_default_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_destructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_move_assignable Update copyright years. 2022-01-03 10:42:10 +01:00
is_trivially_move_constructible Update copyright years. 2022-01-03 10:42:10 +01:00
is_unbounded_array Update copyright years. 2022-01-03 10:42:10 +01:00
is_union Update copyright years. 2022-01-03 10:42:10 +01:00
is_unsigned Update copyright years. 2022-01-03 10:42:10 +01:00
is_void Update copyright years. 2022-01-03 10:42:10 +01:00
is_volatile Update copyright years. 2022-01-03 10:42:10 +01:00
logical_traits Update copyright years. 2022-01-03 10:42:10 +01:00
make_signed/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
make_unsigned/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
memory_resource Update copyright years. 2022-01-03 10:42:10 +01:00
monotonic_buffer_resource libstdc++: Fix test failures at -O0 2022-02-11 21:41:43 +00:00
move Update copyright years. 2022-01-03 10:42:10 +01:00
move_if_noexcept Update copyright years. 2022-01-03 10:42:10 +01:00
move_only_function libstdc++: Fix mem-initializer in std::move_only_function [PR102825] 2021-10-19 11:50:46 +01:00
nonesuch Update copyright years. 2022-01-03 10:42:10 +01:00
optional libstdc++: Fix missing and incorrect feature test macros [PR105269] 2022-04-14 11:02:37 +01:00
owner_less Update copyright years. 2022-01-03 10:42:10 +01:00
pair libstdc++: Fix ambiguous std::pair constructors [PR101124] 2022-01-18 16:31:03 +00:00
pointer_safety Update copyright years. 2022-01-03 10:42:10 +01:00
pointer_traits Update copyright years. 2022-01-03 10:42:10 +01:00
polymorphic_allocator libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
rank Update copyright years. 2022-01-03 10:42:10 +01:00
ratio Update copyright years. 2022-01-03 10:42:10 +01:00
raw_storage_iterator libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
reference_wrapper libstdc++: Add attribute to features deprecated in C++17 [PR91260] 2022-01-14 11:27:50 +00:00
remove_all_extents Update copyright years. 2022-01-03 10:42:10 +01:00
remove_const Update copyright years. 2022-01-03 10:42:10 +01:00
remove_cv Update copyright years. 2022-01-03 10:42:10 +01:00
remove_cvref Update copyright years. 2022-01-03 10:42:10 +01:00
remove_extent Update copyright years. 2022-01-03 10:42:10 +01:00
remove_pointer Update copyright years. 2022-01-03 10:42:10 +01:00
remove_reference Update copyright years. 2022-01-03 10:42:10 +01:00
remove_volatile Update copyright years. 2022-01-03 10:42:10 +01:00
result_of Update copyright years. 2022-01-03 10:42:10 +01:00
scoped_allocator Update copyright years. 2022-01-03 10:42:10 +01:00
shared_ptr libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
specialized_algorithms Update copyright years. 2022-01-03 10:42:10 +01:00
steady_clock Update copyright years. 2022-01-03 10:42:10 +01:00
synchronized_pool_resource Update copyright years. 2022-01-03 10:42:10 +01:00
system_clock Update copyright years. 2022-01-03 10:42:10 +01:00
time_point Update copyright years. 2022-01-03 10:42:10 +01:00
time_point_cast Update copyright years. 2022-01-03 10:42:10 +01:00
to_address Update copyright years. 2022-01-03 10:42:10 +01:00
to_chars libstdc++: Add explicit dg-do directive to .../103955.cc 2022-01-12 11:39:48 -05:00
to_underlying Update copyright years. 2022-01-03 10:42:10 +01:00
tuple Update copyright years. 2022-01-03 10:42:10 +01:00
type_identity/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
typeindex libstdc++: Fixes for tests that fail with -fno-rtti 2022-05-05 21:13:58 +01:00
underlying_type/requirements Update copyright years. 2022-01-03 10:42:10 +01:00
unique_ptr libstdc++: Implement constexpr std::unique_ptr for C++23 (P2273R3) 2022-04-25 16:16:33 +01:00
unreachable libstdc++: Implement std::unreachable() for C++23 (P0627R6) 2022-04-01 13:17:18 +01:00
unsynchronized_pool_resource libstdc++: Fix typo in pragma 2022-02-14 12:46:04 +00:00
unwrap_reference Update copyright years. 2022-01-03 10:42:10 +01:00
uses_allocator libstdc++: Add missing constexpr to uses-allocator construction utilities [PR104542] 2022-02-15 12:49:34 +00:00
variant Update copyright years. 2022-01-03 10:42:10 +01:00
void_t Update copyright years. 2022-01-03 10:42:10 +01:00
weak_ptr libstdc++: Fix constexpr constructor for atomic<shared_ptr<T>> 2022-01-21 13:21:27 +00:00
rel_ops.cc Update copyright years. 2022-01-03 10:42:10 +01:00
temporary_buffer.cc libstdc++: Fix FAIL: 20_util/temporary_buffer.cc for C++14 2022-02-11 21:42:22 +00:00
variable_templates_for_traits.cc Update copyright years. 2022-01-03 10:42:10 +01:00