From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 0E81A3857372; Mon, 16 May 2022 10:08:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E81A3857372 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-506] rtl-optimization/105577 - testcase for the PR X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 6230911cb91d428631e741d7d981fab578102084 X-Git-Newrev: ef7b8976b9143aa78dd9cf5cfdaa02552d6e18a0 Message-Id: <20220516100855.0E81A3857372@sourceware.org> Date: Mon, 16 May 2022 10:08:55 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2022 10:08:55 -0000 https://gcc.gnu.org/g:ef7b8976b9143aa78dd9cf5cfdaa02552d6e18a0 commit r13-506-gef7b8976b9143aa78dd9cf5cfdaa02552d6e18a0 Author: Richard Biener Date: Mon May 16 12:07:31 2022 +0200 rtl-optimization/105577 - testcase for the PR 2022-05-16 Richard Biener PR rtl-optimization/105577 * g++.dg/torture/pr105577.C: New testcase. Diff: --- gcc/testsuite/g++.dg/torture/pr105577.C | 156 ++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/gcc/testsuite/g++.dg/torture/pr105577.C b/gcc/testsuite/g++.dg/torture/pr105577.C new file mode 100644 index 00000000000..52f16a54136 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr105577.C @@ -0,0 +1,156 @@ +// { dg-do compile } +// { dg-additional-options "-fexceptions -fnon-call-exceptions" } + +namespace { +typedef __SIZE_TYPE__ size_t; +} +typedef __UINT8_TYPE__ uint8_t; +typedef __UINT64_TYPE__ uint64_t; +namespace { +template struct integral_constant { + static constexpr _Tp value = __v; +}; +template using __bool_constant = integral_constant; +template struct __conditional { + template using type = _Tp; +}; +template +using __conditional_t = typename __conditional<_Cond>::type<_If, _Else>; +template struct __and_; +template +struct __and_<_B1, _B2> : __conditional_t<_B1::value, _B2, _B1> {}; +template struct __not_ : __bool_constant {}; +template +struct __is_constructible_impl : __bool_constant<__is_constructible(_Tp)> {}; +template +struct is_default_constructible : __is_constructible_impl<_Tp> {}; +template struct remove_extent { typedef _Tp type; }; +template struct enable_if; +} // namespace +namespace std { +template struct allocator_traits { using pointer = _Tp; }; +template struct __alloc_traits : allocator_traits<_Alloc> {}; +template struct _Vector_base { + typedef typename __alloc_traits<_Alloc>::pointer pointer; + struct { + pointer _M_finish; + pointer _M_end_of_storage; + }; +}; +template +class vector : _Vector_base<_Tp, _Alloc> { +public: + _Tp value_type; + typedef size_t size_type; +}; +template class __uniq_ptr_impl { + template struct _Ptr { using type = _Up *; }; + +public: + using _DeleterConstraint = + enable_if<__and_<__not_<_Dp>, is_default_constructible<_Dp>>::value>; + using pointer = typename _Ptr<_Tp, _Dp>::type; +}; +template class unique_ptr { +public: + using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; + pointer operator->(); +}; +enum _Lock_policy { _S_atomic } const __default_lock_policy = _S_atomic; +template <_Lock_policy = __default_lock_policy> class _Sp_counted_base; +template class __shared_ptr; +template <_Lock_policy> class __shared_count { _Sp_counted_base<> *_M_pi; }; +template class __shared_ptr { + using element_type = typename remove_extent<_Tp>::type; + element_type *_M_ptr; + __shared_count<_Lp> _M_refcount; +}; +template class shared_ptr : __shared_ptr<_Tp> { +public: + shared_ptr() noexcept : __shared_ptr<_Tp>() {} +}; +enum CompressionType : char; +class SliceTransform; +enum Temperature : uint8_t; +struct MutableCFOptions { + MutableCFOptions() + : soft_pending_compaction_bytes_limit(), + hard_pending_compaction_bytes_limit(level0_file_num_compaction_trigger), + level0_slowdown_writes_trigger(level0_stop_writes_trigger), + max_compaction_bytes(target_file_size_base), + target_file_size_multiplier(max_bytes_for_level_base), + max_bytes_for_level_multiplier(ttl), compaction_options_fifo(), + min_blob_size(blob_file_size), blob_compression_type(), + enable_blob_garbage_collection(blob_garbage_collection_age_cutoff), + max_sequential_skip_in_iterations(check_flush_compaction_key_order), + paranoid_file_checks(bottommost_compression), bottommost_temperature(), + sample_for_compression() {} + shared_ptr prefix_extractor; + uint64_t soft_pending_compaction_bytes_limit; + uint64_t hard_pending_compaction_bytes_limit; + int level0_file_num_compaction_trigger; + int level0_slowdown_writes_trigger; + int level0_stop_writes_trigger; + uint64_t max_compaction_bytes; + uint64_t target_file_size_base; + int target_file_size_multiplier; + uint64_t max_bytes_for_level_base; + double max_bytes_for_level_multiplier; + uint64_t ttl; + vector compaction_options_fifo; + uint64_t min_blob_size; + uint64_t blob_file_size; + CompressionType blob_compression_type; + bool enable_blob_garbage_collection; + double blob_garbage_collection_age_cutoff; + uint64_t max_sequential_skip_in_iterations; + bool check_flush_compaction_key_order; + bool paranoid_file_checks; + CompressionType bottommost_compression; + Temperature bottommost_temperature; + uint64_t sample_for_compression; +}; +template class autovector { + using value_type = T; + using size_type = typename vector::size_type; + size_type buf_[kSize * sizeof(value_type)]; +}; +class MemTable; +class ColumnFamilyData; +struct SuperVersion { + MutableCFOptions write_stall_condition; + autovector to_delete; +}; +class ColumnFamilySet { +public: + class iterator { + public: + iterator operator++(); + bool operator!=(iterator); + ColumnFamilyData *operator*(); + ColumnFamilyData *current_; + }; + iterator begin(); + iterator end(); +}; +class VersionSet { +public: + ColumnFamilySet *GetColumnFamilySet(); +}; +struct SuperVersionContext { + void NewSuperVersion() { new SuperVersion(); } +}; +class DBImpl { + unique_ptr versions_; + void InstallSuperVersionAndScheduleWork(ColumnFamilyData *, + SuperVersionContext *, + const MutableCFOptions &); +}; +void DBImpl::InstallSuperVersionAndScheduleWork(ColumnFamilyData *, + SuperVersionContext *sv_context, + const MutableCFOptions &) { + sv_context->NewSuperVersion(); + for (auto my_cfd : *versions_->GetColumnFamilySet()) + ; +} +} // namespace std