- 19 Feb, 2020 22 commits
-
-
2020-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de> * collect2.c (maybe_run_lto_and_relink): Fix typo in comment.
Bernd Edlinger committed -
* include/std/memory_resource (polymorphic_allocator::allocate) (polymorphic_allocator::allocate_object): Change type of exception to bad_array_new_length (LWG 3237). * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
Jonathan Wakely committed -
We already defined the traits in <type_traits> as now required by LWG 3348, but the macro was missing. This adds it. * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348). * include/std/version (__cpp_lib_unwrap_ref): Likewise. * testsuite/20_util/unwrap_reference/1.cc: Check macro. * testsuite/20_util/unwrap_reference/3.cc: New test.
Jonathan Wakely committed -
* include/std/numeric (midpoint(T8, T*)): Do not check for complete type during overload resolution, use static assert instead (LWG 3200). * testsuite/26_numerics/midpoint/pointer.cc: Do not test with incomplete type. * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
Jonathan Wakely committed -
The 23_containers/span/deduction.cc test was already passing, but only because I had previously implemented the original proposed resolution of 3255. As pointed out in 3255 that original P/R was incorrect because it broke construction from array xvalues. This reverts the incorrect part of 3255 (and adds tests for the case it broke), and implements the resolution of 3369 instead. * include/std/span (span(T (&)[N])): Use non-deduced context to prevent first parameter from interfering with class template argument deduction (LWG 3369). * testsuite/23_containers/span/deduction.cc: Add missing 'const'. * testsuite/23_containers/span/lwg3255.cc: Check for construction from rvalues.
Jonathan Wakely committed -
* include/std/span (span::const_iterator, span::const_reverse_iterator) (span::cbegin(), span::cend(), span::crbegin(), span::crend()): Remove (LWG 3320). * testsuite/23_containers/span/everything.cc: Replace uses of cbegin and cend. * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_copy/ constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/ uninitialized_default_construct/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_fill/ constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_move/ constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/ uninitialized_value_construct/constrained.cc: Likewise.
Jonathan Wakely committed -
This PR is a regression caused by r256644, which added support for alias checks involving variable strides. One of the changes in that commit was to split the access size out of the segment length. The PR shows that I hadn't done that correctly for the handling of negative strides in vect_compile_time_alias. The old code was: const_length_a = (-wi::to_poly_wide (segment_length_a)).force_uhwi (); offset_a = (offset_a + vect_get_scalar_dr_size (a)) - const_length_a; where vect_get_scalar_dr_size (a) was cancelling out the subtraction of the access size inherent in "- const_length_a". Taking the access size out of the segment length meant that the addition was no longer needed/correct. 2020-02-19 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/93767 * tree-vect-data-refs.c (vect_compile_time_alias): Remove the access-size bias from the offset calculations for negative strides. gcc/testsuite/ PR tree-optimization/93767 * gcc.dg/vect/pr93767.c: New test.
Richard Sandiford committed -
* include/bits/range_access.h (range_size_t): Define alias template. * include/std/ranges (all_view): Rename to views::all_t (LWG 3335). * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
Jonathan Wakely committed -
* include/std/ranges (filter_view, transform_view, take_view) (join_view, split_view, reverse_view): Remove commented-out converting constructors (LWG 3280).
Jonathan Wakely committed -
* include/std/memory (uninitialized_construct_using_allocator): Use std::construct_at (LWG 3321).
Jonathan Wakely committed -
* include/std/memory_resource (polymorphic_allocator::allocate_bytes) (polymorphic_allocator::allocate_object) (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
Jonathan Wakely committed -
* include/bits/range_access.h (enable_safe_range): Rename to enable_borrowed_range. (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range. (safe_range): Rename to borrowed_range. * include/bits/ranges_algo.h: Adjust to use new names. * include/bits/ranges_algobase.h: Likewise. * include/bits/ranges_uninitialized.h: Likewise. * include/std/ranges: Likewise. (safe_iterator_t): Rename to borrowed_iterator_t. (safe_subrange_t): Rename to borrowed_subrange_t. * include/std/span: Adjust to use new names. * include/std/string_view: Likewise. * include/experimental/string_view: Likewise. * testsuite/std/ranges/access/begin.cc: Likewise. * testsuite/std/ranges/access/cbegin.cc: Likewise. * testsuite/std/ranges/access/cdata.cc: Likewise. * testsuite/std/ranges/access/cend.cc: Likewise. * testsuite/std/ranges/access/crbegin.cc: Likewise. * testsuite/std/ranges/access/crend.cc: Likewise. * testsuite/std/ranges/access/data.cc: Likewise. * testsuite/std/ranges/access/end.cc: Likewise. * testsuite/std/ranges/access/rbegin.cc: Likewise. * testsuite/std/ranges/access/rend.cc: Likewise. * testsuite/std/ranges/safe_range.cc: Likewise. * testsuite/std/ranges/safe_range_types.cc: Likewise. * testsuite/util/testsuite_iterators.h: Likewise.
Jonathan Wakely committed -
* include/std/ranges (tuple_element<0, const subrange<I, S, K>>) (tuple_element<1, const subrange<I, S, K>>): Add partial specializations (LWG 3398). * testsuite/std/ranges/subrange/tuple_like.cc: New test.
Jonathan Wakely committed -
Some of these casts were added by me the other day, but some were already present. I think they are all redundant following the introduction of the boolean-testable concept in P1964R2. * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn) (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn) (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
Jonathan Wakely committed -
And avoid signal handler calling signal unsafe functions, and/or calling unlink with uninitialized memory pointer. 2020-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de> * collect2.c (c_file, o_file): Make const again. (ldout,lderrout, dump_ld_file): Remove. (tool_cleanup): Avoid calling not signal-safe functions. (maybe_run_lto_and_relink): Avoid possible signal handler access to unintialzed memory (lto_o_files). (main): Avoid leaking temp files in $TMPDIR. Initialize c_file/o_file with concat, which avoids exposing uninitialized memory to signal handler, which calls unlink(!). Avoid calling maybe_unlink when the main function returns, since the atexit handler is already doing this. * collect2.h (dump_ld_file, ldout, lderrout): Remove.
Bernd Edlinger committed -
SRA can get a bit confused with zero-sized accesses like the one in the testcase. Since there is nothing in the access, nothing is scalarized, but we can get order of the structures wrong, which the verifier is not happy about. Fixed by simply ignoring such accesses. 2020-02-19 Martin Jambor <mjambor@suse.cz> PR tree-optimization/93776 * tree-sra.c (create_access): Do not create zero size accesses. (get_access_for_expr): Do not search for zero sized accesses. testsuite/ * gcc.dg/tree-ssa/pr93776.c: New test.
Martin Jambor committed -
[[no_unique_address]] C++ attribute can cause two fields of a RECORD_TYPE overlap, which currently confuses the totally scalarizing code into creating invalid access tree. For GCC 10, I'd like to simply disable total scalarization of types where this happens. For GCC 11 I'll write down a TODO item to enable total scalarization of cases like this where the problematic fields are basically empty - despite having a non-zero size - i.e. when they are just RECORD_TYPEs without any data fields. 2020-02-19 Martin Jambor <mjambor@suse.cz> gcc/ PR tree-optimization/93667 * tree-sra.c (scalarizable_type_p): Return false if record fields do not follow wach other. gcc/testsuite/ PR tree-optimization/93667 * g++.dg/tree-ssa/pr93667.C: New test.
Martin Jambor committed -
2020-02-19 Tobias Burnus <tobias@codesourcery.com> * .gitattributes: New; whitespace handling for Fortran's openacc_lib.h. * config/accel/openacc.f90 (openacc_kinds): Add acc_device_current. (openacc_internal, acc_on_device_h): Fix argument name; minor cleanup. * libgomp.texi (Enabling OpenACC): No longer mark as experimental. (acc_set_device_num): Fix Fortran argument name, use same name for C. (acc_get_property): Update Fortran interface to post-OpenACC 3.0 corrections; add note about the previous interface and named constant. (OpenACC library and environment variables): Fix two typos. * openacc.f90: Use for all procedures the argument names from the spec as for …_h they are user visible. (openacc_kinds): Rename acc_device_property to acc_device_property_kinds and change value to int32 ; and update users. Re-add acc_device_property for for backward compatibility. (acc_get_property_string_h): Clean up as acc_device_property_kind changed. (acc_get_property_h): Likewise and return c_size_t instead of acc_device_property. (openacc): Also export acc_device_property_kinds. (acc_async_test_h, acc_async_test_all_h, acc_on_device_h, acc_is_present_32_h, acc_is_present_64_h): Simplify logical-return-value handling; check against /= 0 instead of == 1 to match C. * openacc_lib.h: Use for all procedures the argument names from the spec as for …_h they are user visible. Place !GCC$ into the first column to be active also for fixed-form souce form. (acc_device_current, acc_device_property_kind, acc_device_property, acc_property_memory, acc_property_free_memory, acc_property_name, acc_property_vendor, acc_property_driver): New named constants. (acc_get_property, acc_get_property_string): New generic interface.
Tobias Burnus committed -
- fmv.x.s/fmv.s.x renamed to fmv.x.w/fmv.w.x in the latest RISC-V ISA manual. - Tested rv32gc/rv64gc on bare-metal with qemu. ChangeLog gcc/ Kito Cheng <kito.cheng@sifive.com> * config/riscv/riscv.c (riscv_output_move) Using fmv.x.w/fmv.w.x rather than fmv.x.s/fmv.s.x.
Kito Cheng committed -
Among other changes, P1983R0 resolves LWG 3278 in a different way, so this patch also reverts the already-applied wording of LWG 3278. The wording for US291 (the join_view::begin hunk) also required adding the friend _Iterator<!_Const> to join_view::_Iterator. This friend is needed so that _Iterator's converting constructor can access the private members of an _Iterator of the opposite constness. The wording for US283 has already been applied it seems. libstdc++-v3/ChangeLog: P1983R0 Wording for GB301, US296, US292, US291, and US283 * include/std/ranges (filter_view::pred): New member function. (join_view::_Iterator::_Iterator): Remove now-redundant comment since P1983R0 fixes the highlighted issue in the same way. (join_view::_Iterator<_Const>): Add friend join_view::_Iterator<!_Const>. (join_view::_M_inner): Remove mutable specifier, effectively reverting the proposed wording changes of P3278. (join_view::begin): Refine the condition for when to return a const iterator. (split_view::_OuterIter::_OuterIter): Adjust constraints. * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred exists and works.
Patrick Palka committed -
2020-02-18 Hongtao Liu <hongtao.liu@intel.com> gcc/testsuite/ * g++.dg/other/i386-2.C: add -mavx512vbmi2 * g++.dg/other/i386-3.C: Ditto.
liuhongt committed -
GCC Administrator committed
-
- 18 Feb, 2020 18 commits
-
-
PR libstdc++/93818 * include/std/ranges (_RangeAdaptor): Add deduction guide. (filter_view::_Iterator): Add alias _Vp_iter and use in place of iterator_t<_Vp>. (filter_view::_Iterator::_S_iter_cat()): Add 'typename'. (transform_view::_Iterator): Add alias _Base_iter and use in place of iterator_t<_Base>. (transform_view::_Iterator::_S_iter_cat()): Add 'typename'. (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases. (join_view::_Iterator::_S_iter_cat()): Add 'typename'. (split_view::_InnerIter::_S_iter_cat()): Likewise.
Jonathan Wakely committed -
Move some arm_neon.h functions which currently use assembly over to intrinsics. 2020-02-18 James Greenhalgh <james.greenhalgh@arm.com> gcc/ * config/aarch64/aarch64-simd-builtins.def (intrinsic_vec_smult_lo_): New. (intrinsic_vec_umult_lo_): Likewise. (vec_widen_smult_hi_): Likewise. (vec_widen_umult_hi_): Likewise. * config/aarch64/aarch64-simd.md (aarch64_intrinsic_vec_<su>mult_lo_<mode>): New. * config/aarch64/arm_neon.h (vmull_high_s8): Use intrinsics. (vmull_high_s16): Likewise. (vmull_high_s32): Likewise. (vmull_high_u8): Likewise. (vmull_high_u16): Likewise. (vmull_high_u32): Likewise. (vmull_s8): Likewise. (vmull_s16): Likewise. (vmull_s32): Likewise. (vmull_u8): Likewise. (vmull_u16): Likewise. (vmull_u32): Likewise. gcc/testsuite/ * gcc.target/aarch64/vmull_high.c: New.
James Greenhalgh committed -
I only tested LP64 targets and missed this maybe-long unsigned int. Tested with GXX_TESTSUITE_STDS=98,11,14,17,2a make check-c++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=array-init1.C' 2020-02-18 Marek Polacek <polacek@redhat.com> PR c++/93817 * g++.dg/diagnostic/array-init1.C: Fix for ILP32.
Marek Polacek committed -
Jon Beniston committed
-
This will need to be done in the gc version too, probably more cleverly. This version will ensure that the next GCC release works correctly when using the GCC version of the go tool. Updates golang/go#37272 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219817
Ian Lance Taylor committed -
* testsuite/20_util/integer_comparisons/equal.cc: Fix invalid assumption that long is wider than int. * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise. * testsuite/20_util/integer_comparisons/less.cc: Likewise. * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise. * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
Jonathan Wakely committed -
2020-02-18 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/93599 * io/async.c (destroy_adv_cond): Do not destroy lock. (async_io): Make sure au->lock is locked for finishing of thread. Do not lock/unlock around signalling emptysignal. Unlock au->lock before return. (init_adv_cond): Do not initialize lock. (enqueue_transfer): Unlock after signal. (enqueue_done_id): Likewise. (enqueue_done): Likewise. (enqueue_close): Likewise. (enqueue_data_transfer): Likewise. (async_wait_id): Do not lock/unlock around signalling au->work. (async_wait): Unlock after signal. * io/async.h (SIGNAL): Add comment about needed au->lock. Remove locking/unlocking of advcond->lock. (WAIT_SIGNAL_MUTEX): Add comment. Remove locking/unlocking of advcond->lock. Unlock mutex only at the end. Loop on __ghread_cond_wait returning zero. (REVOKE_SIGNAL): Add comment. Remove locking/unlocking of advcond->lock. (struct adv_cond): Remove mutex from struct. asdf
Thomas König committed -
This includes fixes for first, last, as_bytes and as_writable_bytes which were missing from the paper. * include/std/span (__cpp_lib_span): Update value. (span(It, size_type), span(It, End)): Make conditionally explicit. Add assertion. (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax constraints. (span::first<Count>(), span::last<Count>()): Use explicit type in return statement. (as_bytes, as_writable_bytes): Likewise. * include/std/version (__cpp_lib_span): Update value. * testsuite/23_containers/span/1.cc: Check new value. * testsuite/23_containers/span/2.cc: Check new value. * testsuite/23_containers/span/explicit.cc: New test.
Jonathan Wakely committed -
This makes the constraints consistent with the pre-Prague working paper. * include/std/span (span::__is_compatible_array): Simplify alias template by using requires-clause. (span::__is_compatible_ref): New alias template for constraining constructors. (span::__is_compatible_iterator, span::__is_compatible_range): Remove. (span(It, size_type), span(It, End)): Use __is_compatible_ref. (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove redundant parentheses. (span(R&&)): Add missing constraints.
Jonathan Wakely committed -
I find it easier to work with this class when the declarations match the order in the C++2a working paper. There's no need to use long, descriptive template parameter names like _ContiguousIterator when the parameter is already constrained by the std::contiguous_iterator concept. This is also consistent with the naming conventions in the working paper. * include/std/span (span): Reorder members and rename template parameters to match declarations in the C++2a working paper.
Jonathan Wakely committed -
Following this change it's no longer possible to use std::span with structured bindings or with the tuple-like API. It will probably come back for C++23 though. P2116R0 Remove tuple-like protocol support from fixed-extent span * include/std/span (get, tuple_size, tuple_element): Remove. * testsuite/23_containers/span/everything.cc: Remove checks for tuple-like API. * testsuite/23_containers/span/get_neg.cc: Remove. * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove. * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove. * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
Jonathan Wakely committed -
libstdc++-v3/ChangeLog: P2106R0 Alternative wording for GB315 and GB316 * include/bits/ranges_algo.h (in_fun_result): New. (for_each_result, for_each_n_result): Change into an alias of in_fun_result. (in_in_result): New. (mismatch_result): Change into an alias of in_in_result. (copy_if_result): Change into an alias of in_out_result. (swap_ranges_result): Change into an alias of in_in_result. (unary_transform_result): Change into an alias of in_out_result. (in_in_out_result): New. (binary_transform_result): Change into an alias of in_in_out_result. (replace_copy_result, replace_copy_if_result, remove_copy_if_result, remove_copy_result, unique_copy_result, reverse_copy_result, rotate_copy_result, partial_sort_copy_result): Change into an alias of in_out_result. (in_out_out_result): New. (partition_copy_result, merge_result): Change into an alias of in_out_out_result. (set_union_result, set_intersection_result): Change into an alias of in_in_out_result. (set_difference_result): Change into an alias of in_out_result. (set_symmetric_difference): Change into an alias of in_in_out_result. (min_max_result): New. (minmax_result, minmax_element_result): Change into an alias of min_max_result. (in_found_result): New. (next_permutation_result, prev_permutation_result): Change into an alias of in_found_result. (__next_permutation_fn::operator(), __prev_permutation_fn::operator()): Adjust following changes to next_permutation_result and prev_permutation_result. * include/bits/ranges_algobase.h (in_out_result): New. (copy_result, move_result, move_backward_result, copy_backward_result, copy_n_result): Change into an alias of in_out_result. * include/bits/ranges_uninitialized.h (uninitialized_copy_result, uninitialized_copy_n_result, uninitialized_move_result, uninitialized_move_n_result): Likewise. * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of structured bindings. * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
Patrick Palka committed -
This adds rangified overloads for for_each_n, sample and clamp as per P1243R4. libstdc++-v3/ChangeLog: P1243R4 Rangify new algorithms * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn, for_each_n, __sample_fn, sample, __clamp_fn, clamp): New. * testsuite/25_algorithms/clamp/constrained.cc: New test. * testsuite/25_algorithms/for_each/constrained.cc: Augment test. * testsuite/25_algorithms/sample/constrained.cc: New test.
Patrick Palka committed -
An ICE occurred if an attempt was made to assign a pointer to a character variable that has an length incorrectly specified using a real constant and does not have the target attribute. gcc/fortran/ChangeLog PR fortran/93714 * expr.c (gfc_check_pointer_assign): Move check for matching character length to after checking the lvalue attributes for target or pointer. gcc/testsuite/ChangeLog PR fortran/93714 * gfortran.dg/char_pointer_assign_6.f90: Look for no target message instead of length mismatch. * gfortran.dg/pr93714_1.f90 * gfortran.dg/pr93714_2.f90
Mark Eggleston committed -
* value-prof.c (stream_out_histogram_value): Restore LTO PGO bootstrap by missing removal of invalid sanity check.
Martin Liska committed -
ICE occurs when assigning a BOZ constant to an class(*) variable with the allocatable attribute. Use of BOZ constants outside data statements and int/real/dble/cmplx intrinsics is not allowed. Original patch provided by Steven G. Kargl <kargl@gcc.gnu.org>. gcc/fortran/ChangeLog PR fortran/93601 * match.c (gfc_match_assignment) : Reject assignment if the lhs stype is BT_CLASS and the rhs type is BT_BOZ. gcc/testsuite/ChangeLog PR fortran/93601 * gfortran.dg/pr93601.f90 : New test.
Mark Eggleston committed -
PR ipa/92518 * ipa-icf-gimple.c (func_checker::compare_gimple_assign): Always compare LHS of gimple_assign.
Martin Liska committed -
PR ipa/93583 * cgraph.c (cgraph_node::verify_node): Verify MALLOC attribute and return type of functions. * ipa-param-manipulation.c (ipa_param_adjustments::adjust_decl): Drop MALLOC attribute for void functions. * ipa-pure-const.c (funct_state_summary_t::duplicate): Drop malloc_state for a new VOID clone. PR ipa/93583 * gcc.dg/ipa/pr93583.c: New test.
Martin Liska committed
-