- Feb 19, 2020
-
-
Tobias Burnus authored
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.
-
Kito Cheng authored
- 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.
-
Patrick Palka authored
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.
-
liuhongt authored
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.
-
GCC Administrator authored
-
- Feb 18, 2020
-
-
Jonathan Wakely authored
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.
-
James Greenhalgh authored
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.
-
Marek Polacek authored
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.
-
Jon Beniston authored
-
Ian Lance Taylor authored
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
-
Jonathan Wakely authored
* 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.
-
Thomas König authored
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
-
Jonathan Wakely authored
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 authored
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 authored
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 authored
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.
-
Patrick Palka authored
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 authored
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.
-
Mark Eggleston authored
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
-
Martin Liska authored
* value-prof.c (stream_out_histogram_value): Restore LTO PGO bootstrap by missing removal of invalid sanity check.
-
Mark Eggleston authored
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.
-
Martin Liska authored
PR ipa/92518 * ipa-icf-gimple.c (func_checker::compare_gimple_assign): Always compare LHS of gimple_assign.
-
Martin Liska authored
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 authored
PR ipa/92924 * common.opt: Add -fprofile-reproducibility. * doc/invoke.texi: Document it. * value-prof.c (dump_histogram_value): Document and support behavior for counters[0] being a negative value. (get_nth_most_common_value): Handle negative counters[0] in respect to flag_profile_reproducible. PR ipa/92924 * libgcov-merge.c (merge_topn_values_set): Record when a TOP N counter becomes invalid. When merging remove a smallest value if the space is needed.
-
David Malcolm authored
gcc/analyzer/ChangeLog: PR analyzer/93692 * analyzer.opt (fdump-analyzer-callgraph): Rewrite description.
-
David Malcolm authored
PR analyzer/93777 reports ICEs in a Fortran and C++ case involving a cast of a NULL pointer to a REFERENCE_TYPE. In both cases the call to build_cast fails and returns a NULL type, but region_model::maybe_cast_1 asserts that a non-NULL type was returned. This patch fixes the ICEs by converting the assertion to a conditional. gcc/analyzer/ChangeLog: PR analyzer/93777 * region-model.cc (region_model::maybe_cast_1): Replace assertion that build_cast returns non-NULL with a conditional, falling through to the logic which returns a new unknown value of the desired type if it fails. gcc/testsuite/ChangeLog: PR analyzer/93777 * g++.dg/analyzer/pr93777.C: New test. * gfortran.dg/analyzer/pr93777.f90: New test.
-
David Malcolm authored
PR analyzer/93778 reports an ICE with -fanalyzer on a gfortran test case at this gimple stmt: _gfortran_st_set_nml_var (&dt_parm.0, &ro.xi.jq, &"ro%xi%jq"[1]{lb: 1 sz: 1}, 4, 0, D.3913); where ro.xi.jq is a COMPONENT_REF, but ro.xi is of type "struct bl[3]". The analyzer's handling of COMPONENT_REF assumes that the type of the 1st argument is a RECORD_TYPE or UNION_TYPE, whereas in this case it's an ARRAY_TYPE, leading to a failed as_a inside region_model::get_field_region. This patch fixes the ICE by generalizing the "give up on this tree code" logic from r10-6667-gf76a88ebf089871dcce215aa0cb1956ccc060895 for PR analyzer/93388, so that the analyzer gives up when it needs to get an lvalue for a COMPONENT_REF on something other than a RECORD_TYPE or UNION_TYPE. gcc/analyzer/ChangeLog: PR analyzer/93778 * engine.cc (impl_region_model_context::on_unknown_tree_code): Rename to... (impl_region_model_context::on_unexpected_tree_code): ...this and convert first argument from path_var to tree. (exploded_node::on_stmt): Pass ctxt to purge_for_unknown_fncall. * exploded-graph.h (region_model_context::on_unknown_tree_code): Rename to... (region_model_context::on_unexpected_tree_code): ...this and convert first argument from path_var to tree. * program-state.cc (sm_state_map::purge_for_unknown_fncall): Add ctxt param and pass on to calls to get_rvalue. * program-state.h (sm_state_map::purge_for_unknown_fncall): Add ctxt param. * region-model.cc (region_model::handle_unrecognized_call): Pass ctxt on to call to get_rvalue. (region_model::get_lvalue_1): Move body of default case to region_model::make_region_for_unexpected_tree_code and call it. Within COMPONENT_REF case, reject attempts to handle types other than RECORD_TYPE and UNION_TYPE. (region_model::make_region_for_unexpected_tree_code): New function, based on default case of region_model::get_lvalue_1. * region-model.h (region_model::make_region_for_unexpected_tree_code): New decl. (region_model::on_unknown_tree_code): Rename to... (region_model::on_unexpected_tree_code): ...this and convert first argument from path_var to tree. (class test_region_model_context): Update vfunc implementation for above change. gcc/testsuite/ChangeLog: PR analyzer/93778 * gfortran.dg/analyzer/pr93778.f90: New test.
-
David Malcolm authored
PR analyzer/93774 reports an ICE in gfortran with -fanalyzer within region_model::convert_byte_offset_to_array_index on a pointer of incomplete type ("character(kind=1)[0:][1:0] * restrict"). This patch bulletproofs the routine against incomplete types, fixing the ICE. gcc/analyzer/ChangeLog: PR analyzer/93774 * region-model.cc (region_model::convert_byte_offset_to_array_index): Use int_size_in_bytes before calling size_in_bytes, to gracefully fail on incomplete types. gcc/testsuite/ChangeLog: PR analyzer/93774 * gfortran.dg/analyzer/deferred_character_25.f90: New test, based on gfortran.dg/deferred_character_25.f90.
-
David Malcolm authored
PR analyzer/93779 reports an ICE in gfortran with -fanalyzer that was fixed for GCC 10 by a workaround in f76a88eb; the tree code in question is a FUNCTION_DECL. Given that I want to rework the above patch at some point, it seems prudent to add test coverage to ensure the ICE doesn't come back, which this patch does. gcc/testsuite/ChangeLog: PR analyzer/93779 * gfortran.dg/analyzer/pr88304-2.f90: New test, adapted from gfortran.fortran-torture/compile/pr88304-2.f90
-
Mark Eggleston authored
Associating a symbol with a BOZ constant caused an ICE. Output an error message as an association target cannot be a BOZ constant. Original patch provided by Steven G. Kargl <kargl@gcc.gnu.org>. gcc/fortran/ChangeLog PR fortran/93603 * match.c (gfc_match_associate) : If target expression has the type BT_BOZ output an error and goto assocListError. gcc/testsuite/ChangeLog PR fortran/93603 * gfortran.dg/pr93603.f90 : New test.
-
Mark Eggleston authored
Caused by using invalid part_refs in kind specifications, e.g. %re or %im on non-complex expressions and %len on non character expressions. Check whether %re, %im and %len are valid when checking kind specification. The original patch from Steven G. Kargl <kargl@gcc.gnu.org> only checked for %re and %im. gcc/fortran/ChangeLog: PR fortran/93580 * primary.c (gfc_match_varspec): If the symbol following % is re or im and the primary expression type is not BT_COMPLEX issue an error. If the symbol is len and the primary expression type is not BT_CHARACTER is an error. gcc/testsuite/ChangeLog: PR fortran/93580 * gfortran.dg/dg/pr93580.f90: New test.
-
Jakub Jelinek authored
As the patch shows, various messages didn't match the field names they are talking about. 2020-02-18 Jakub Jelinek <jakub@redhat.com> PR ipa/93797 * cgraph.c (verify_speculative_call): Use speculative_id instead of speculative_uid in messages. Remove trailing whitespace from error message. Use num_speculative_call_targets instead of num_speculative_targets in a message. (cgraph_node::verify_node): Use call_stmt instead of cal_stmt in edge messages and stmt instead of cal_stmt in reference message.
-
Jakub Jelinek authored
The following testcase ICEs, because execute_update_addresses_taken attempts to create a VECTOR_TYPE with non-power of 2 number of elts. Fixed by guarding it with the corresponding predicate. 2020-02-18 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/93780 * tree-ssa.c (non_rewritable_lvalue_p): Check valid_vector_subparts_p before calling build_vector_type. (execute_update_addresses_taken): Likewise. * gcc.dg/pr93780.c: New test.
-
Jakub Jelinek authored
2020-02-18 Jakub Jelinek <jakub@redhat.com> PR driver/93796 * params.opt (-param=ipa-max-switch-predicate-bounds=): Fix help typo, functoin -> function. * tree.c (free_lang_data_in_decl): Fix comment typo, functoin -> function. * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
-
David Malcolm authored
The two places in diagnostics.c where URLs are printed both do non-trivial work to generate the URL strings (including malloc/free), so don't do this work if URL-printing is disabled. gcc/ChangeLog: * diagnostic.c (print_any_cwe): Don't call get_cwe_url if URLs won't be printed. (print_option_information): Don't call get_option_url if URLs won't be printed.
-
David Malcolm authored
PR analyzer/93775 reports an ICE in cgraph_node::get when -fanalyzer is used on code that calls a function pointer that was generated via a cast from a non-function. This patch fixes it by bulletproofing region_model::get_fndecl_for_call for the case where the code_region's get_tree_for_child_region returns NULL. gcc/analyzer/ChangeLog: PR analyzer/93775 * region-model.cc (region_model::get_fndecl_for_call): Handle the case where the code_region's get_tree_for_child_region returns NULL. gcc/testsuite/ChangeLog: PR analyzer/93775 * gcc.dg/analyzer/20020129-1.c: New test.
-
GCC Administrator authored
-
- Feb 17, 2020
-
-
Joseph Myers authored
* sv.po: Update.
-
Alexandre Oliva authored
Thread-local variables with DECL_COMMON trigger an internal compiler error on targets that use emulated TLS without register_common, when we attempt to expand a call to the NULL register_common, with testcases as simple as gcc.dg/tls/emutls-2.c. The documentation states that, on such targets, common variables would fall back to explicitly initialized. This patch rearranges the code that deals with initialization of common and non-common variables, complementing code that is already in place to detect register_common-less targets. for gcc/ChangeLog * tree-emutls.c (new_emutls_decl, emutls_common_1): Complete handling of register_common-less targets. for gcc/testsuite/ChangeLog * gcc.dg/tls/emutls-3.c: New, combining emutls-2.c and thr-init-2.c into an execution test with explicitly common variables.
-
Wilco Dijkstra authored
Fix PR93565 testcase for ILP32. testsuite/ * gcc.target/aarch64/pr93565.c: Fix test for ilp32.
-