- 26 Jul, 2018 2 commits
-
-
The purpose of the lib-13.f90 test-case is to test acc_wait_all_async. The test indeed calls acc_wait_all_async, but then subsequentlys calls acc_wait_all, so the acc_wait_all_async functionality is not tested. Furthermore, all acc_async_test calls are placed in a location where they are not guaranteed to succeed, which explains why there's an xfail for the lower optimization levels. This patch fixes the problems by replacing acc_wait_all with an acc_wait on the async id used for the acc_wait_all_async call, and moving the acc_async_test calls to the correct locations. Reg-tested on x86_64 with nvptx accelerator. 2018-07-26 Tom de Vries <tdevries@suse.de> * testsuite/libgomp.oacc-fortran/lib-13.f90: Replace acc_wait_all with acc_wait. Move acc_async_test calls to correct locations. Remove xfail. From-SVN: r262989
Tom de Vries committed -
From-SVN: r262988
GCC Administrator committed
-
- 25 Jul, 2018 25 commits
-
-
PR libstdc++/86676 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request same alignment for post-release allocation. From-SVN: r262984
Jonathan Wakely committed -
From-SVN: r262982
Joseph Myers committed -
gcc/testsuite/ChangeLog: * gcc.c-torture/execute/builtins/strnlen.c: Remove DejaGnu directives ignored by the test harness. From-SVN: r262981
Martin Sebor committed -
PR libstdc++/86676 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for buffer being misaligned and so returned pointer not being at start. From-SVN: r262980
Jonathan Wakely committed -
2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/25829 * testsuite/libgomp.fortran/async_io_1.f90: Really commit. * testsuite/libgomp.fortran/async_io_2.f90: Really commit. * testsuite/libgomp.fortran/async_io_3.f90: Really commit. * testsuite/libgomp.fortran/async_io_4.f90: Really commit. * testsuite/libgomp.fortran/async_io_5.f90: Really commit. * testsuite/libgomp.fortran/async_io_6.f90: Really commit. * testsuite/libgomp.fortran/async_io_7.f90: Really commit. From-SVN: r262979
Nicolas Koenig committed -
2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/25829 * gfortran.texi: Add description of asynchronous I/O. * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables as volatile. * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to st_wait_async and change argument spec from ".X" to ".w". (gfc_trans_wait): Pass ID argument via reference. 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/25829 * gfortran.dg/f2003_inquire_1.f03: Add write statement. * gfortran.dg/f2003_io_1.f03: Add wait statement. 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/25829 * Makefile.am: Add async.c to gfor_io_src. Add async.h to gfor_io_headers. * Makefile.in: Regenerated. * gfortran.map: Add _gfortran_st_wait_async. * io/async.c: New file. * io/async.h: New file. * io/close.c: Include async.h. (st_close): Call async_wait for an asynchronous unit. * io/file_pos.c (st_backspace): Likewise. (st_endfile): Likewise. (st_rewind): Likewise. (st_flush): Likewise. * io/inquire.c: Add handling for asynchronous PENDING and ID arguments. * io/io.h (st_parameter_dt): Add async bit. (st_parameter_wait): Correct. (gfc_unit): Add au pointer. (st_wait_async): Add prototype. (transfer_array_inner): Likewise. (st_write_done_worker): Likewise. * io/open.c: Include async.h. (new_unit): Initialize asynchronous unit. * io/transfer.c (async_opt): New struct. (wrap_scalar_transfer): New function. (transfer_integer): Call wrap_scalar_transfer to do the work. (transfer_real): Likewise. (transfer_real_write): Likewise. (transfer_character): Likewise. (transfer_character_wide): Likewise. (transfer_complex): Likewise. (transfer_array_inner): New function. (transfer_array): Call transfer_array_inner. (transfer_derived): Call wrap_scalar_transfer. (data_transfer_init): Check for asynchronous I/O. Perform a wait operation on any pending asynchronous I/O if the data transfer is synchronous. Copy PDT and enqueue thread for data transfer. (st_read_done_worker): New function. (st_read_done): Enqueue transfer or call st_read_done_worker. (st_write_done_worker): New function. (st_write_done): Enqueue transfer or call st_read_done_worker. (st_wait): Document as no-op for compatibility reasons. (st_wait_async): New function. * io/unit.c (insert_unit): Use macros LOCK, UNLOCK and TRYLOCK; add NOTE where necessary. (get_gfc_unit): Likewise. (init_units): Likewise. (close_unit_1): Likewise. Call async_close if asynchronous. (close_unit): Use macros LOCK and UNLOCK. (finish_last_advance_record): Likewise. (newunit_alloc): Likewise. * io/unix.c (find_file): Likewise. (flush_all_units_1): Likewise. (flush_all_units): Likewise. * libgfortran.h (generate_error_common): Add prototype. * runtime/error.c: Include io.h and async.h. (generate_error_common): New function. 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/25829 * testsuite/libgomp.fortran/async_io_1.f90: New test. * testsuite/libgomp.fortran/async_io_2.f90: New test. * testsuite/libgomp.fortran/async_io_3.f90: New test. * testsuite/libgomp.fortran/async_io_4.f90: New test. * testsuite/libgomp.fortran/async_io_5.f90: New test. * testsuite/libgomp.fortran/async_io_6.f90: New test. * testsuite/libgomp.fortran/async_io_7.f90: New test. Co-Authored-By: Thomas Koenig <tkoenig@gcc.gnu.org> From-SVN: r262978
Nicolas Koenig committed -
* include/experimental/memory_resource: Include <cstddef> header. From-SVN: r262977
Jonathan Wakely committed -
cp-tree.h (enum cp_tree_index): Add CPTI_{ABI_TAG,ALIGNED,BEGIN,END,GET,TUPLE_{ELEMENT,SIZE}}_IDENTIFIER and... * cp-tree.h (enum cp_tree_index): Add CPTI_{ABI_TAG,ALIGNED,BEGIN,END,GET,TUPLE_{ELEMENT,SIZE}}_IDENTIFIER and CPTI_{GNU,TYPE,VALUE,FUN,CLOSURE}_IDENTIFIER. (abi_tag_identifier, aligned_identifier, begin_identifier, end_identifier, get__identifier, gnu_identifier, tuple_element_identifier, tuple_size_identifier, type_identifier, value_identifier, fun_identifier, closure_identifier): Define. * decl.c (initialize_predefined_identifiers): Initialize the above identifiers. (get_tuple_size): Use tuple_size_identifier instead of get_identifier ("tuple_size") and value_identifier instead of get_identifier ("value"). (get_tuple_element_type): Use tuple_element_identifier instead of get_identifier ("tuple_element") and type_identifier instead of get_identifier ("type"). (get_tuple_decomp_init): Use get__identifier instead of get_identifier ("get"). * lambda.c (maybe_add_lambda_conv_op): Use fun_identifier instead of get_identifier ("_FUN"). * parser.c (cp_parser_lambda_declarator_opt): Use closure_identifier instead of get_identifier ("__closure"). (cp_parser_std_attribute): Use gnu_identifier instead of get_identifier ("gnu"). (cp_parser_std_attribute_spec): Likewise. Use aligned_identifier instead of get_identifier ("aligned"). * class.c (check_abi_tags, inherit_targ_abi_tags): Use abi_tag_identifier instead of get_identifier ("abi_tag"). From-SVN: r262976
Jakub Jelinek committed -
PR c++/85515 * cp-tree.h (enum cp_tree_index): Add CPTI_FOR_{RANGE,BEGIN,END}{,_}_IDENTIFIER. (for_range__identifier, for_begin__identifier, for_end__identifier, for_range_identifier, for_begin_identifier, for_end_identifier): Define. * decl.c (initialize_predefined_identifiers): Initialize for_{range,begin,end}{,_}_identifier. * parser.c (build_range_temp): Use for_range__identifier instead of get_identifier ("__for_range"). (cp_convert_range_for): Use for_begin__identifier and for_end__identifier instead of get_identifier ("__for_begin") and get_identifier ("__for_end"). * semantics.c (finish_for_stmt): Rename "__for_{range,begin,end} " local symbols to "__for_{range,begin,end}". * g++.dg/pr85515-2.C: Add expected dg-error. * g++.dg/cpp0x/range-for36.C: New test. From-SVN: r262975
Jakub Jelinek committed -
Update the list of default optimizations used for size compilations. gcc/ 2018-07-10 Claudiu Zissulescu <claziss@synopsys.com> * common/config/arc/arc-common.c (arc_option_optimization_table): Update default optimizations for size. From-SVN: r262973
Claudiu Zissulescu committed -
gcc/po: * gcc.pot: Regenerate. libcpp/po: * cpplib.pot: Regenerate. From-SVN: r262972
Joseph Myers committed -
Improve selection of short instruction for fp-moves. gcc/ 2018-05-17 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.md (movsf_insn): Add short instruction selection. * config/arc/constraints.md (CfZ): New constraint. * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint. (subsf3_fpu): Likewise. (cmpsf_fpu): Likewise. (cmpsf_fpu_uneq): Likewise. From-SVN: r262971
Claudiu Zissulescu committed -
gcc/ 2018-05-09 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.c (compact_memory_operand_p): Check for uncached accesses as well. (arc_is_uncached_mem_p): uncached applies to both the variable and the pointer. testsuite/ 2018-05-09 Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/uncached-1.c: New test. * gcc.target/arc/uncached-2.c: Likewise. From-SVN: r262970
Claudiu Zissulescu committed -
gcc/ Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional register names. From-SVN: r262969
Claudiu Zissulescu committed -
gcc/ChangeLog: * optinfo-emit-json.cc (class optrecord_json_writer): Convert field "m_scopes" from vec to auto_vec. From-SVN: r262967
David Malcolm committed -
2018-07-25 Martin Liska <mliska@suse.cz> * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix return type. From-SVN: r262966
Martin Liska committed -
2018-07-25 Richard Biener <rguenther@suse.de> PR debug/86654 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions special wrt context_die late. (gen_subprogram_die): Re-use DIEs in local scope. From-SVN: r262965
Richard Biener committed -
* acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17. * src/Makefile.am: Add comment. * src/c++17/Makefile.in: Regenerate. From-SVN: r262964
Jonathan Wakely committed -
This will allow std::mutex and std::lock_guard to be used elsewhere in the library without pulling in the whole of <chrono>. Previously the whole of <bits/std_mutex.h> was conditional on the _GLIBCXX_USE_C99_STDINT_TR1 macro, but only the std::unique_lock members that use <chrono> facilities should depend on that. std::mutex only needs to depend on _GLIBCXX_HAS_GTHREADS and std::lock_guard can be defined unconditionally. Some parts of <bits/std_mutex.h> and <mutex> are based on code in <ext/concurrence.h> which dates from 2003. However, the std::unique_lock implementation was added in 2008 by r135007, without using any earlier code. Therefore the new header file has copyright years 2008-2018. * include/Makefile.am: Add new <bits/unique_lock.h> header. * include/Makefile.in: Regenerate. * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex) (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1. (unique_lock): Move definition to ... * include/bits/unique_lock.h: New header. [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally. [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point)) (unique_lock(mutex_type&, duration), unique_lock::try_lock_until) (unique_lock::try_lock_for): Define only when <chrono> is usable. * include/std/condition_variable: Include <bits/unique_lock.h>. * include/std/mutex: Likewise. From-SVN: r262963
Jonathan Wakely committed -
From-SVN: r262962
Richard Sandiford committed -
This PR shows a pathological case in which we try SLP vectorisation on dead code. We record that 0 bits of the result are enough to satisfy all users (which is true), and that led to precision being 0 in: static unsigned int vect_element_precision (unsigned int precision) { precision = 1 << ceil_log2 (precision); return MAX (precision, BITS_PER_UNIT); } ceil_log2 (0) returned 64 rather than 0, leading to 1 << 64, which is UB. 2018-07-25 Richard Sandiford <richard.sandiford@arm.com> gcc/ * hwint.c (ceil_log2): Fix comment. Return 0 for 0. From-SVN: r262961
Richard Sandiford committed -
2018-07-25 Martin Liska <mliska@suse.cz> PR middle-end/86645 * dumpfile.c: And excluded values with TDF_ALL_VALUES. * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES. From-SVN: r262960
Martin Liska committed -
2018-07-25 Martin Liska <mliska@suse.cz> PR sanitizer/79635 * params.def: Explain ASan abbreviation and provide a documentation link. From-SVN: r262959
Martin Liska committed -
PR tree-optimization/86622 - incorrect strlen of array of array plus variable offset PR tree-optimization/86532 - Wrong code due to a wrong strlen folding starting with r262522 gcc/ChangeLog: PR tree-optimization/86622 PR tree-optimization/86532 * builtins.h (string_length): Declare. * builtins.c (c_strlen): Correct handling of non-constant offsets. (check_access): Be prepared for non-constant length ranges. (string_length): Make extern. * expr.c (string_constant): Only handle the minor non-constant array index. Use string_constant to compute the length of a generic string constant. gcc/testsuite/ChangeLog: PR tree-optimization/86622 PR tree-optimization/86532 * gcc.c-torture/execute/strlen-2.c: New test. * gcc.c-torture/execute/strlen-3.c: New test. * gcc.c-torture/execute/strlen-4.c: New test. From-SVN: r262958
Martin Sebor committed -
From-SVN: r262957
GCC Administrator committed
-
- 24 Jul, 2018 13 commits
-
-
This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in <experimental/memory_resource>, but memory_resource and polymorphic_allocator ended up looking almost the same anyway. The constant_init kluge in src/c++17/memory_resource.cc is apparently due to Richard Smith and ensures that the objects are constructed during constant initialiation phase and not destroyed (because the constant_init destructor doesn't destroy the union member and the storage is not reused). * config/abi/pre/gnu.ver: Export new symbols. * configure: Regenerate. * include/Makefile.am: Add new <memory_resource> header. * include/Makefile.in: Regenerate. * include/precompiled/stdc++.h: Include <memory_resource> for C++17. * include/std/memory_resource: New header. (memory_resource, polymorphic_allocator, new_delete_resource) (null_memory_resource, set_default_resource, get_default_resource) (pool_options, monotonic_buffer_resource): Define. * src/Makefile.am: Add c++17 directory. * src/Makefile.in: Regenerate. * src/c++11/Makefile.am: Fix comment. * src/c++17/Makefile.am: Add makefile for new sub-directory. * src/c++17/Makefile.in: Generate. * src/c++17/memory_resource.cc: New. (newdel_res_t, null_res_t, constant_init, newdel_res, null_res) (default_res, new_delete_resource, null_memory_resource) (set_default_resource, get_default_resource): Define. * testsuite/20_util/memory_resource/1.cc: New test. * testsuite/20_util/memory_resource/2.cc: New test. * testsuite/20_util/monotonic_buffer_resource/1.cc: New test. * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/release.cc: New test. * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc: New test. * testsuite/20_util/polymorphic_allocator/1.cc: New test. * testsuite/20_util/polymorphic_allocator/resource.cc: New test. * testsuite/20_util/polymorphic_allocator/select.cc: New test. * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource): Define concrete memory resource for testing. (__gnu_test::default_resource_mgr): Define RAII helper for changing default resource. From-SVN: r262953
Jonathan Wakely committed -
An output iterator passed as the unused first argument to __niter_wrap might have already been invalidated, so don't copy it. PR libstdc++/86658 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused parameter by reference, to avoid copying invalid iterators. * testsuite/25_algorithms/copy/86658.cc: New test. From-SVN: r262952
Jonathan Wakely committed -
r262589 introduced another instance of the bug fixed in r258131. 2018-07-23 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/86618 * tree-vect-stmts.c (vectorizable_call): Don't take the address of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null. From-SVN: r262951
Richard Sandiford committed -
There are various ways that it's possible for a gimple statement to have an UNKNOWN_LOCATION, and for that UNKNOWN_LOCATION to be wrapped in an ad-hoc location to capture inlining information. For such a location, LOCATION_FILE (loc) is NULL. Various places in -fsave-optimization-record were checking for loc != UNKNOWN_LOCATION and were passing LOCATION_FILE (loc) to code that assumed a non-NULL filename, thus leading to segfaults for the above cases. This patch updates the tests to use LOCATION_LOCUS (loc) != UNKNOWN_LOCATION instead, to look through ad-hoc location wrappers, fixing the segfaults. It also adds various assertions to the affected code. gcc/ChangeLog: PR tree-optimization/86636 * json.cc (json::object::set): Fix comment. Add assertions. (json::array::append): Move here from json.h. Add comment and an assertion. (json::string::string): Likewise. * json.h (json::array::append): Move to json.cc. (json::string::string): Likewise. * optinfo-emit-json.cc (optrecord_json_writer::impl_location_to_json): Assert that we aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc wrapper around it. Expand the location once, rather than three times. (optrecord_json_writer::inlining_chain_to_json): Fix the check for UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc wrappers. (optrecord_json_writer::optinfo_to_json): Likewise, in four places. Fix some overlong lines. gcc/testsuite/ChangeLog: PR tree-optimization/86636 * gcc.c-torture/compile/pr86636.c: New test. From-SVN: r262950
David Malcolm committed -
Committed on behalf of matthew.malcomson@arm.com 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com> * config/aarch64/aarch64-simd.md (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into... (aarch64_<ANY_EXTEND:su>subw<mode>): ... This... (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this. (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into... (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This... (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this. (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into... (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This... (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this. * gcc.target/aarch64/vect-su-add-sub.c: New. From-SVN: r262949
Matthew Malcomson committed -
PR middle-end/86627 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT and abs_d == d, do the power of two handling if profitable. * gcc.target/i386/pr86627.c: New test. From-SVN: r262948
Jakub Jelinek committed -
* include/std/bit (__countl_zero, __countr_zero, __popcount): Use local variables for number of digits instead of type aliases. (__log2p1): Remove redundant branch also checked in __countl_zero. From-SVN: r262947
Jonathan Wakely committed -
2018-07-24 Richard Biener <rguenther@suse.de> * match.pd: Add BIT_FIELD_REF canonicalizations. From-SVN: r262946
Richard Biener committed -
The erased_type condition is only true for code using the Library Fundamentals TS, so assume it's less common and only check it after checking for convertibility. This does mean for types using erased_type the more expensive convertibility check is done first, but such types are rare. * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder conditions. Add comments. * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line. * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise. * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise. From-SVN: r262945
Jonathan Wakely committed -
By making the memory_resource base class a template parameter the __resource_adaptor_imp can be used to adapt an allocator into a std::pmr::memory_resource instead of experimental::pmr::memory_resource. * include/experimental/memory_resource: Adjust comments and whitespace. (__resource_adaptor_imp): Add second template parameter for type of memory resource base class. (memory_resource): Define default constructor, destructor, copy constructor and copy assignment operator as defaulted. From-SVN: r262944
Jonathan Wakely committed -
PR libstdc++/70966 * include/experimental/memory_resource (__get_default_resource): Use placement new to create an object with dynamic storage duration. From-SVN: r262943
Jonathan Wakely committed -
PR testsuite/86649 * g++.dg/tree-ssa-/pr19476-1.C: Check dom2 dump instead of ccp1. * g++.dg/tree-ssa-/pr19476-5.C: Likewise. * g++.dg/tree-ssa-/pr19476-6.C: New test. * g++.dg/tree-ssa-/pr19476-7.C: New test. From-SVN: r262942
Jakub Jelinek committed -
From-SVN: r262940
GCC Administrator committed
-