1. 12 May, 2019 2 commits
    • fortran: C++ support for generating C prototypes · 4c016457
      When generating C prototypes for Fortran procedures with the
      -fc-prototypes and -fc-prototypes-external options, print a snippet
      defining macros for complex types, and add C++ support by suppressing
      mangling.
      
      fortran/ChangeLog:
      
      2019-05-12  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	* dump-parse-tree.c (get_c_type_name): Use macros for complex type
      	names.
      	* parse.c (gfc_parse_file): Define complex macros, add CPP support
      	when printing C prototypes.
      
      From-SVN: r271106
      Janne Blomqvist committed
    • Daily bump. · 1fa26ccd
      From-SVN: r271105
      GCC Administrator committed
  2. 11 May, 2019 9 commits
    • darwin, ppc - improve debug for mdebug-stack · 65ecff90
      Darwin uses an out of line save when complete context
      needs to be saved, including the vector regs.
      
      This patch prints the status of that when -mdebug=stack
      is given.
      
      gcc/
      
      2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/rs6000/rs6000.c (debug_stack_info): When -mdebug=stack
      	is given, print the state of the EH "save world" computation for
      	Darwin.
      
      From-SVN: r271101
      Iain Sandoe committed
    • fixincludes - fix PR90379 · 7121b43f
      One should not provide test_text for wrap style fixes
      this was causing the test to fail.  No change to the
      actual fix.
      
      2019-05-11  Iain Sandoe  <iain@sandoe.co.uk>
      	PR target/90379
      	PR bootstrap/89864
      	* inclhack.def (darwin_ucred__Atomic): Do not supply test_text
      	for wrap fixes.
      	* fixincl.x: Regenerated.
      
      From-SVN: r271098
      Iain Sandoe committed
    • testsuite, darwin] Fix PR81058. · bd765eed
      The tests fail because Darwin indirects common accesses which causes different
      codegen and the mismatch in output. Placing the vars in regular .data section
      fixes that.
      
      gcc/testsuite/
      
      2019-05-11  Iain Sandoe  <iain@sandoe.co.uk>
      
      	PR testsuite/81058
      	* gcc.target/i386/avx512bw-vpmovswb-1.c: Use regular data section
      	for variables on Darwin, rather than common.
      	* gcc.target/i386/avx512bw-vpmovuswb-1.c: Likewise.
      	* gcc.target/i386/avx512bw-vpmovwb-1.c: Likewise.
      
      From-SVN: r271097
      Iain Sandoe committed
    • stl_bvector.h (operator==(const _Bit_iterator_base&, const… · e9c54233
      stl_bvector.h (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)): Make hidden friend.
      
      2019-05-11  François Dumont  <fdumont@gcc.gnu.org>
      
      	* include/bits/stl_bvector.h
      	(operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Make hidden friend.
      	(operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Likewise.
      	(operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Likewise.
      	(operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Likewise.
      	(operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Likewise.
      	(operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Likewise.
      	(operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
      	Likewise.
      	(_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
      	copy elision.
      	(_Bit_iterator::operator-(difference_type)): Likewise.
      	(operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
      	(_Bit_const_iterator::operator+(difference_type)): Likewise and allow
      	NRVO copy elision.
      	(_Bit_const_iterator::operator-(difference_type)): Likewise.
      	(operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
      
      From-SVN: r271096
      François Dumont committed
    • re PR c++/59813 (tail-call elimination didn't fire for left-shift of char to cout) · b5b9147d
      	PR c++/59813
      	* config/aarch64/aarch64.c (aarch64_expand_epilogue): Don't add
      	EH_RETURN_STACKADJ_RTX to sp in sibcall epilogues.
      
      From-SVN: r271093
      Jakub Jelinek committed
    • i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm): Use pinsrd for TARGET_SSE4_1. · c57cbfe2
      	* config/i386/i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm):
      	Use pinsrd for TARGET_SSE4_1.
      	* config/i386/sse.md (movdi_to_sse): Ditto.
      
      From-SVN: r271092
      Uros Bizjak committed
    • typeck.c (cp_build_function_call_vec): When mark_used fails unconditionally return error_mark_node. · a46695c1
      /cp
      2019-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* typeck.c (cp_build_function_call_vec): When mark_used fails
      	unconditionally return error_mark_node.
      
      /testsuite
      2019-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C: New.
      	* g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C: Likewise.
      
      From-SVN: r271091
      Paolo Carlini committed
    • runtime: set up g early · c130ab6a
          
          runtime.throw needs a g to work properly. Set up g early, to
          ensure that if something goes wrong in the runtime startup (e.g.
          runtime.check fails), the program terminates in a reasonable way.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176657
      
      From-SVN: r271088
      Ian Lance Taylor committed
    • Daily bump. · d7b9b080
      From-SVN: r271087
      GCC Administrator committed
  3. 10 May, 2019 24 commits
    • PR libstdc++/81266 fix std::thread::native_handle_type test · 1a1e427c
      The test uses remove_pointer because in most cases native_handle_type is
      a pointer to the actual type that the C++ class contains. However, for
      std::thread, native_handle_type is the same type as the type contained
      in std::thread, and so remove_pointer is not needed. On targets where
      pthread_t is a pointer type remove_pointer<native_handle_type> is not a
      no-op, instead it transforms pthread_t and causes the test to fail.
      
      The fix is to not apply remove_pointer when testing std::thread.
      
      	PR libstdc++/81266
      	* testsuite/util/thread/all.h: Do not use remove_pointer for
      	std::thread::native_handle_type.
      
      From-SVN: r271080
      Jonathan Wakely committed
    • PR libstdc++/90397 fix std::variant friend declarations · 4b7a3ab8
      Clang diagnoses the inconsistent noexcept-specifier on the friend
      declaration of __get. Add it, and also on __get_storage.
      
      	PR libstdc++/90397
      	* include/std/variant (_Variant_storage<false, Types...>::_M_storage())
      	(_Variant_storage<true, Types...>::_M_reset()))
      	(_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
      	(__get_storage): Likewise.
      	(variant): Add noexcept to friend declarations for __get and
      	__get_storage.
      
      From-SVN: r271079
      Jonathan Wakely committed
    • PR libstdc++/90388 fix std::hash<unique_ptr<T,D>> bugs · 7fb65a87
      A disabled specialization should not be callable, so move the function
      call operator into a new base class which correctly implements the
      disabled hash semantics. For the versioned namespace configuration do
      not derive from __poison_hash in the enabled case, as the empty base
      class serves no purpose but potentially increases the object size. For
      the default configuration that base class must be kept, to preserve
      layout.
      
      An enabled specialization should not be unconditionally noexcept,
      because the underlying hash object might throw.
      
      	PR libstdc++/90388
      	* include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
      	Use _Require for constraints.
      	(operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
      	per the standard.
      	(__uniq_ptr_hash): New base class with conditionally-disabled call
      	operator.
      	(hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
      	* testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
      	* testsuite/20_util/unique_ptr/hash/90388.cc: New test.
      
      From-SVN: r271078
      Jonathan Wakely committed
    • Improve API docs for <memory> and <new> · 302b6996
      	* include/bits/shared_ptr.h: Improve docs.
      	* include/bits/shared_ptr_base.h: Likewise.
      	* include/bits/stl_uninitialized.h: Likewise.
      	* include/bits/unique_ptr.h: Likewise.
      	* libsupc++/new: Likewise.
      
      From-SVN: r271077
      Jonathan Wakely committed
    • re PR fortran/61968 (ICE (assembly failure) due to wrongly generating a vtable… · 15e5858f
      re PR fortran/61968 (ICE (assembly failure) due to wrongly generating a vtable for TYPE(*) / BT_ASSUMED_TYPE)
      
      2019-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/61968
          * interface.c (compare_actual_formal): Do not create a vtab if
          the actual argument is assumed type.
      
      2019-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/61968
          * gfortran.dg/assumed_type_10.f90: New test case.
          * gfortran.dg/assumed_type_11.f90: New test case.
      
      From-SVN: r271076
      Thomas Koenig committed
    • Fix typo in gcc/fortran/ChangeLog · 93fd52fc
      From-SVN: r271075
      Janne Blomqvist committed
    • compiler: permit inlining receive expressions · 4f395222
          
          This does not permit any new inlinable functions in the standard library.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176637
      
      From-SVN: r271074
      Ian Lance Taylor committed
    • darwin, testsuite - provide an asm shim for AVX12F tests. · c735deb4
      Darwin will build these tests and run them if/when it's 
      available on the relevant hardware.
      
      2019-05-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Darwin is
      	now tested.
      	* gcc.target/x86_64/abi/avx512f/asm-support-darwin.s: New.
      
      From-SVN: r271073
      Iain Sandoe committed
    • decl.c (grokvardecl): Use an accurate location in error message about main as a global variable. · 67254b50
      /cp
      2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* decl.c (grokvardecl): Use an accurate location in error message
      	about main as a global variable.
      
      /testsuite
      2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* g++.dg/diagnostic/main1.C: New.
      
      From-SVN: r271070
      Paolo Carlini committed
    • call.c (build_call_a): Use FUNC_OR_METHOD_TYPE_P. · 7bdc7e06
      2019-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* call.c (build_call_a): Use FUNC_OR_METHOD_TYPE_P.
      	* cp-gimplify.c (cp_fold): Likewise.
      	* cp-objcp-common.c (cp_type_dwarf_attribute): Likewise.
      	* cp-tree.h (TYPE_OBJ_P, TYPE_PTROBV_P): Likewise.
      	* cvt.c (perform_qualification_conversions): Likewise.
      	* decl.c (grokdeclarator): Likewise.
      	* decl2.c (build_memfn_type): Likewise.
      	* mangle.c (canonicalize_for_substitution, write_type): Likewise.
      	* parser.c (cp_parser_omp_declare_reduction): Likewise.
      	* pt.c (check_explicit_specialization, uses_deducible_template_parms,
      	check_cv_quals_for_unify, dependent_type_p_r): Likewise.
      	* rtti.c (ptr_initializer): Likewise.
      	* semantics.c (finish_asm_stmt, finish_offsetof,
      	cp_check_omp_declare_reduction): Likewise.
      	* tree.c (cp_build_qualified_type_real,
      	cp_build_type_attribute_variant, cxx_type_hash_eq,
      	cxx_copy_lang_qualifiers, cp_free_lang_data): Likewise.
      	* typeck.c (structural_comptypes, convert_arguments,
      	cp_build_addr_expr_1, unary_complex_lvalue, cp_build_c_cast,
      	cp_build_modify_expr, comp_ptr_ttypes_real, type_memfn_rqual):
      	Likewise.
      
      From-SVN: r271069
      Paolo Carlini committed
    • PR c++/78010 - bogus -Wsuggest-override warning on final function. · d49b251f
      	* class.c (check_for_override): Don't warn for final functions.
      
      	* g++.dg/warn/Wsuggest-override-2.C: New test.
      
      From-SVN: r271065
      Marek Polacek committed
    • compiler: permit inlining variable declaration statements · 93d2b703
          
          This adds all of two inlinable functions to the standard library:
          crypto/subtle.ConstantTimeLessOrEq, regexp.(*Regexp).Copy.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176378
      
      From-SVN: r271063
      Ian Lance Taylor committed
    • tree-ssa-sccvn.c (visit_reference_op_call): Initialize value-id. · cd643742
      2019-05-10  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-sccvn.c (visit_reference_op_call): Initialize value-id.
      	(do_rpo_vn): Initialize next_value_id.
      
      From-SVN: r271061
      Richard Biener committed
    • Fix a plural in a param description. · a9d5227c
      2019-05-10  Martin Liska  <mliska@suse.cz>
      
      	* params.def (PARAM_GIMPLE_FE_COMPUTED_HOT_BB_THRESHOLD):
      	Fix plural form.
      
      From-SVN: r271060
      Martin Liska committed
    • re PR tree-optimization/90385 (ICE: tree check: expected ssa_name, have real_cst… · 425f5fd4
      re PR tree-optimization/90385 (ICE: tree check: expected ssa_name, have real_cst in transform_to_exit_first_loop_alt, at tree-parloops.c:1772)
      
      	PR tree-optimization/90385
      	* tree-parloops.c (try_create_reduction_list): Punt on non-SSA_NAME
      	arguments of the exit phis.
      
      	* gfortran.dg/pr90385.f90: New test.
      
      From-SVN: r271059
      Jakub Jelinek committed
    • re PR c++/90383 (GCC generates invalid constexpr copy/move assignment operators… · b5cbaee2
      re PR c++/90383 (GCC generates invalid constexpr copy/move assignment operators for types with trailing padding. (Again))
      
      	PR c++/90383
      	* tree-inline.h (struct copy_body_data): Add do_not_fold member.
      	* tree-inline.c (remap_gimple_op_r): Avoid folding expressions if
      	id->do_not_fold.
      	(copy_tree_body_r): Likewise.
      	(copy_fn): Set id.do_not_fold to true.
      
      	* g++.dg/cpp1y/constexpr-90383-1.C: New test.
      	* g++.dg/cpp1y/constexpr-90383-2.C: New test.
      
      From-SVN: r271058
      Jakub Jelinek committed
    • re PR fortran/90093 (Extended C interop: optional argument incorrectly identified as PRESENT) · 0a524296
      2019-05-10  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/90093
      	* trans-decl.c (convert_CFI_desc): Test that the dummy is
      	present before doing any of the conversions.
      
      	PR fortran/90352
      	* decl.c (gfc_verify_c_interop_param): Restore the error for
      	charlen > 1 actual arguments passed to bind(C) procs.
      	Clean up trailing white space.
      
      	PR fortran/90355
      	* trans-array.c (gfc_trans_create_temp_array): Set the 'span'
      	field to the element length for all types.
      	(gfc_conv_expr_descriptor): The force_no_tmp flag is used to
      	prevent temporary creation, especially for substrings.
      	* trans-decl.c (gfc_trans_deferred_vars): Rather than assert
      	that the backend decl for the string length is non-null, use it
      	as a condition before calling gfc_trans_vla_type_sizes.
      	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
      	is set before calling gfc_conv_expr_descriptor.
      	* trans.c (get_array_span): Move the code for extracting 'span'
      	from gfc_build_array_ref to this function. This is specific to
      	descriptors that are component and indirect references.
      	* trans.h : Add the force_no_tmp flag bitfield to gfc_se.
      
      2019-05-10  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/90093
      	* gfortran.dg/ISO_Fortran_binding_12.f90: New test.
      	* gfortran.dg/ISO_Fortran_binding_12.c: Supplementary code.
      
      	PR fortran/90352
      	* gfortran.dg/iso_c_binding_char_1.f90: New test.
      
      	PR fortran/90355
      	* gfortran.dg/ISO_Fortran_binding_4.f90: Add 'substr' to test
      	the direct passing of substrings as descriptors to bind(C).
      	* gfortran.dg/assign_10.f90: Increase the tree_dump count of
      	'atmp' to account for the setting of the 'span' field.
      	* gfortran.dg/transpose_optimization_2.f90: Ditto.
      
      From-SVN: r271057
      Paul Thomas committed
    • re PR tree-optimization/88709 (Improve store-merging) · e965aaf6
      	PR tree-optimization/88709
      	PR tree-optimization/90271
      	* gcc.dg/store_merging_29.c: Allow 4 stores to replace 6 stores on
      	arm*-*-*.
      
      From-SVN: r271056
      Jakub Jelinek committed
    • re PR pch/90326 (Using any precompiled header breaks definition of FLT_MAX) · 8a6c4d31
      	PR pch/90326
      cp/
      	* config-lang.in (gtfiles): Remove c-family/c-lex.c, add
      	c-family/c-cppbuiltin.c.
      objc/
      	* config-lang.in (gtfiles): Add c-family/c-format.c.
      objcp/
      	* config-lang.in (gtfiles): Don't add c-family/c-cppbuiltin.c.
      testsuite/
      	* g++.dg/pch/pr90326.C: New test.
      	* g++.dg/pch/pr90326.Hs: New file.
      
      From-SVN: r271055
      Jakub Jelinek committed
    • Reapply r269790 which was missed during rebase. · ecd71fee
      2019-05-10  Martin Liska  <mliska@suse.cz>
      
      	* config/i386/i386-expand.c (ix86_expand_floorceildf_32):
      	Reapply changes from r269790.
      
      From-SVN: r271054
      Martin Liska committed
    • Add params for jump-table expansion params (PR middle-end/90340). · 26f36b50
      2019-05-10  Martin Liska  <mliska@suse.cz>
      
      	PR middle-end/90340
      	* doc/invoke.texi: New params.
      	* params.def (PARAM_JUMP_TABLE_MAX_GROWTH_RATIO_FOR_SIZE): New.
      	(PARAM_JUMP_TABLE_MAX_GROWTH_RATIO_FOR_SPEED): Likewise.
      	* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
      	Use it.
      	* tree-switch-conversion.h (struct jump_table_cluster):
      	Likewise.
      2019-05-10  Martin Liska  <mliska@suse.cz>
      
      	PR middle-end/90340
      	* gcc.dg/tree-ssa/pr90340-2.c: New test.
      	* gcc.dg/tree-ssa/pr90340.c: New test.
      
      From-SVN: r271053
      Martin Liska committed
    • Fix location where lto-dump is installed. · 38613b9b
      2019-05-10  Martin Liska  <mliska@suse.cz>
      
      	* Make-lang.in: Use program_transform_name for lto-dump.
      	* config-lang.in: Do not mark lto-dump compiler as we don't
      	want to have it installed at
      	lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
      
      From-SVN: r271052
      Martin Liska committed
    • Daily bump. · 44226181
      From-SVN: r271051
      GCC Administrator committed
    • combine: Don't generate IF_THEN_ELSE · ddbb5da5
      On all targets I managed to test (21) this results in better code.  Only
      alpha ends up with slightly bigger code.
      
      
      	* combine.c (combine_simplify_rtx): Don't make IF_THEN_ELSE RTL.
      
      From-SVN: r271047
      Segher Boessenkool committed
  4. 09 May, 2019 5 commits