1. 27 Mar, 2019 7 commits
    • PR c++/86932 - missed SFINAE with empty pack. · ce460995
      The issue here was that when processing the explicit template args in
      fn_type_unification we added an empty argument pack for the parameter pack,
      so we never tried to do any deduction for it, and therefore never looked at
      its type.  We need that empty pack behavior for partial ordering, but we
      don't want it here, so let's make it conditional on tf_partial.
      
      	* pt.c (coerce_template_parms): Don't add an empty pack if
      	tf_partial.
      	(fn_type_unification): Pass tf_partial to coerce_template_parms.
      
      From-SVN: r269965
      Jason Merrill committed
    • 20190327-1.c: New testcase. · 079c81da
      2019-03-27  Richard Biener  <rguenther@suse.de>
      
      	* gcc.dg/torture/20190327-1.c: New testcase.
      
      From-SVN: r269964
      Richard Biener committed
    • re PR fortran/88247 (ICE in get_array_ctor_var_strlen, at fortran/trans-array.c:2068) · d5f48c7c
      2019-03-27  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/88247
      	* expr.c (is_subref_array): Permit substrings to be detected
      	as subref arrays.
      	* trans-array.c (get_array_ctor_var_strlen): Obtain the length
      	of deferred length strings. Handle substrings with a NULL end
      	expression.
      	(trans_array_constructor): Remove an unnecessary blank line.
      	(gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
      	is a pointer array.
      	(get_array_charlen): If the expression is an array, convert the
      	first element of the constructor and use its string length. Get
      	a new charlen if necessary.
      	(gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
      	constructor expressions. If the ss_info string length is
      	available, use that to set the span of character arrays.
      	* trans-expr.c (gfc_get_expr_charlen): Handle substrings
      	* trans-stmt.c (trans_associate_var): Set the pointer array
      	flag for variable targets and constant array constructors. Take
      	care not to reset the string length or the span in the case of
      	expressions that are not converted as direct by reference.
      
      2019-03-27  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/88247
      	* gfortran.dg/associate_47.f90: New test.
      
      From-SVN: r269962
      Paul Thomas committed
    • re PR debug/89463 (debug information for iterator of an empty loop is gone (at -O3)) · 6461f211
      2019-03-27  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/89463
      	* tree-ssa-dce.c (remove_dead_stmt): Take output vector to
      	queue edges to remove.
      	(eliminate_unnecessary_stmts): Remove dead PHIs alongside
      	dead stmts.  Delay edge removal until PHIs are removed to
      	make debug-stmt creation not confused by seemingly degenerate
      	PHIs.
      
      	* gcc.dg/guality/pr89463.c: New testcase.
      
      From-SVN: r269961
      Richard Biener committed
    • [RS6000] Rename NON_SPECIAL_REGS to GEN_OR_FLOAT_REGS · c686fcbc
      	* config/rs6000/rs6000.h: Rename NON_SPECIAL_REGS to GEN_OR_FLOAT_REGS
      	throughout file.
      	* config/rs6000/darwin.h: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      
      From-SVN: r269960
      Alan Modra committed
    • [RS6000] Don't rely on rs6000_hard_regno_mode_ok being zero · 914be15c
      	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Always
      	assign rs6000_hard_regno_mode_ok_p[m][r].  Formatting.
      
      From-SVN: r269959
      Alan Modra committed
    • Daily bump. · 416fcd3d
      From-SVN: r269958
      GCC Administrator committed
  2. 26 Mar, 2019 21 commits
    • RISC-V: Add sifive-7 pipeline description. · 88108b27
      	* config/riscv/generic.md (generic_alu, generic_load, generic_store)
      	(generic_xfer, generic_branch, generic_imul, generic_idivsi)
      	(generic_idivdi, generic_fmul_single, generic_fmul_double)
      	(generic_fdiv, generic_fsqrt): Add check for generic tune.
      	(generic_alu): Add auipc to type list.
      	* config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): New.
      	(riscv_microarchitecture): Declare.
      	* config/riscv/riscv-protos.h (riscv_store_data_bypass_p): Declare.
      	* config/riscv/riscv.c (struct riscv_cpu_info): Add microarchitecture
      	field.
      	(riscv_microarchitecture): New.
      	(sifive_7_tune_info): New.
      	(riscv_cpu_info_table): Add microarchitecture value for rocket and
      	size.  Add sifive-3-series, sifive-5-series, and sifive-7-series
      	entries.
      	(riscv_store_data_bypass_p): New.
      	(riscv_option_override): Set riscv_microarchitecture from
      	cpu->microarchitecture.
      	* config/riscv/riscv.md: Include sifive-7.md.
      	(type): Add auipc.
      	(tune): New.
      	(auipc<mode>): Change type to auipc.
      	(restore_stack_nonlocal): New.
      	* config/riscv/sifive-7.md: New.
      	* doc/invoke.texi (RISC-V Options): Update mtune docs.
      
      Co-Authored-By: Jim Wilson <jimw@sifive.com>
      
      From-SVN: r269954
      Andrew Waterman committed
    • re PR target/89827 (ICE: in convert_op, at config/i386/i386.c:2098 with -Os -maes) · a48d7fa6
      	PR target/89827
      	* config/i386/i386.c (dimode_scalar_chain::convert_reg):
      	Also process XEXP (src, 0) of a shift insn.
      
      testsuite/ChangeLog:
      
      	PR target/89827
      	* gcc.target/i386/pr89827.c: New test.
      
      From-SVN: r269953
      Uros Bizjak committed
    • Fix g++.dg/abi/lambda-static-1.C with Solaris as · 9df23a66
      	* g++.dg/abi/lambda-static-1.C: Handle Solaris as comdat group
      	syntax.
      
      From-SVN: r269952
      Rainer Orth committed
    • PR c++/86429 - constexpr variable in lambda. · c59fa7ea
      When we refer to a captured variable from a constant-expression context
      inside a lambda, the closure (like any function parameter) is not constant
      because we aren't in a call, so we don't have an argument.  So the capture
      is non-constant.  But if the captured variable is constant, we might be able
      to use it directly in constexpr evaluation.
      
      	PR c++/82643
      	PR c++/87327
      	* constexpr.c (cxx_eval_constant_expression): In a lambda function,
      	try evaluating the captured variable directly.
      
      From-SVN: r269951
      Jason Merrill committed
    • PR libstdc++/85965 delay static assertions until types are complete · 7ac20567
      The static assertions added for PR libstdc++/48101 were at class scope
      and so were evaluated too eagerly, when it might not be possible to
      determine whether the function objects are invocable with the key types.
      The problematic cases are where the key type is not known to be
      convertible to the argument type(s) of the function object until later,
      after a type has been completed. Specifically, if the key type is a
      pointer to a derived class and the function object's argument type is a
      pointer to a base class, then the derived-to-base conversion is only
      valid once the derived type is complete.
      
      By moving the static assertions to the destructor they will only be
      evaluated when the destructor is instantiated, at which point whether
      the key type can be passed to the function object should be knowable.
      The ideal place to do the checks would be only when the function objects
      are actually invoked, but that would mean adding the checks in numerous
      places, so the destructor is used instead.
      
      The tests need to be adjusted because the "required from here" line is
      now the location of the destructor, not the point of instantiation in
      the test file. For the map and multimap tests which check two
      specializations, the dg-error matching the assertion text matches both
      cases. Also check the diagnostic output for the template arguments, to
      ensure both specializations trigger the assertion.
      
      	PR libstdc++/85965
      	* include/bits/hashtable.h (_Hashtable): Move static assertions to
      	destructor so they are not evaluated until the _Key type is complete.
      	* include/bits/stl_tree.h (_Rb_tree): Likewise.
      	* testsuite/23_containers/set/85965.cc: New test.
      	* testsuite/23_containers/unordered_set/85965.cc: New test.
      	* testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
      	with regexp matching the corresponding _Rb_tree specialization.
      	* testsuite/23_containers/multimap/48101_neg.cc: Likewise.
      	* testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
      	* testsuite/23_containers/set/48101_neg.cc: Likewise.
      	* testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
      	* testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
      	* testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
      	* testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
      
      From-SVN: r269949
      Jonathan Wakely committed
    • libphobos: Backport extern(C) bindings from druntime 2.085. · 0da83a16
      Merges upstream druntime b9564bef.
      
      Reviewed-on: https://github.com/dlang/druntime/pull/2512
      
      libphobos/ChangeLog:
      
      2019-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
      	core/sys/darwin/crt_externs.d.
      	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/unistd.d.
      	(DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/spawn.d.
      	* libdruntime/Makefile.in: Regenerate.
      
      From-SVN: r269948
      Iain Buclaw committed
    • re PR libstdc++/89825 (Jump table for variant visitation could be shortened for… · da97b98a
      re PR libstdc++/89825 (Jump table for variant visitation could be shortened for never empty variants)
      
      PR libstdc++/89825
      
      Fix based on a suggestion by Antony Polukhin.
      * include/std/variant (_Extra_visit_slot_needed): New.
      (_Multi_array): Use it.
      (_S_apply_all_alts): Likewise.
      
      From-SVN: r269947
      Ville Voutilainen committed
    • tree-inline.c (remap_gimple_stmt): Cache gimple_block. · cf66c831
      2019-03-26  Richard Biener  <rguenther@suse.de>
      
      	* tree-inline.c (remap_gimple_stmt): Cache gimple_block.
      	(copy_debug_stmt): Likewise.
      	(expand_call_inline): Likewise.
      	(copy_bb): Avoid redundant lookup & set of gimple_block.
      	* gimple-low.c (lower_gimple_return): Likewise.
      	(lower_builtin_setjmp): Likewise.
      
      From-SVN: r269946
      Richard Biener committed
    • d/dmd: Merge upstream dmd ab702e73e · ecbb1530
      Fixes memory leak in the front-end symbol mangler, and introduces
      recognition and rejection of a few more C types and directives.
      
      Reviewed-on: https://github.com/dlang/dmd/pull/9492
      
      From-SVN: r269945
      Iain Buclaw committed
    • hash-table.h (hash_table::m_gather_mem_stats): If GATHER_STATISTICS is constant 0... · 465b8e7f
      	* hash-table.h (hash_table::m_gather_mem_stats): If GATHER_STATISTICS
      	is constant 0, turn into static const data member initialized to false.
      	(hash_table::hash_table): Only initialize m_gather_mem_stats #if
      	GATHER_STATISTICS.  Add ATTRIBUTE_UNUSED to gather_mem_stats param.
      
      From-SVN: r269944
      Jakub Jelinek committed
    • mem-stats.h (mem_alloc_description::unregister_descriptor): New method. · a6f36166
      	* mem-stats.h (mem_alloc_description::unregister_descriptor): New
      	method.
      	(mem_alloc_description::release_object_overhead): Fix comment typos.
      	* hash-table.h (hash_table::~hash_table): Call
      	release_instance_overhead only if m_entries is non-NULL, otherwise
      	call unregister_descriptor.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r269943
      Jason Merrill committed
    • re PR libstdc++/89824 (Variant jump table reserves space for __variant_cookie twice) · 11767f80
      PR libstdc++/89824
      
      Fix based on a suggestion by Antony Polukhin.
      * include/std/variant (__gen_vtable): Don't reserve an
      additional table slot, _Multi_array already does that.
      
      From-SVN: r269941
      Ville Voutilainen committed
    • re PR libstdc++/89816 (std::variant move construction regressed since GCC 8.3) · 8be4d02b
      PR libstdc++/89816
      
      Fix based on a suggestion by Antony Polukhin.
      * include/std/variant (__variant_construct): Capture a pointer
      to the storage and visit just one variant.
      
      From-SVN: r269940
      Ville Voutilainen committed
    • re PR tree-optimization/81740 (wrong code at -O3 in both 32-bit and 64-bit modes… · f30d4934
      re PR tree-optimization/81740 (wrong code at -O3 in both 32-bit and 64-bit modes on x86_64-linux-gnu)
      
      2019-03-26  Bin Cheng  <bin.cheng@linux.alibaba.com>
      
      	PR tree-optimization/81740
      	* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
      	In case of outer loop vectorization, check for backward dependence
      	at the inner loop if outer loop dependence is reversed.
      
      	* gcc.dg/vect/pr81740-1.c: New testcase.
      	* gcc.dg/vect/pr81740-2.c: Likewise.
      
      From-SVN: r269938
      Bin Cheng committed
    • gdc-test.exp (gdc-do-test): Sort and remove duplicate options in permute args tests. · a235c72e
      gcc/testsuite/ChangeLog:
      
      2019-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	* gdc.test/gdc-test.exp (gdc-do-test): Sort and remove duplicate
      	options in permute args tests.
      
      From-SVN: r269937
      Iain Buclaw committed
    • re PR c++/84598 (internal compiler error: Segmentation fault (cp_default_conversion())) · d7533996
      2019-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/84598
      	* g++.dg/ext/pr84598.C: New.
      
      From-SVN: r269936
      Paolo Carlini committed
    • Add missing dot. · 139fc820
      From-SVN: r269935
      Martin Liska committed
    • Fix wrong option wrapping. · 303389b1
      2019-03-26  Martin Liska  <mliska@suse.cz>
      
      	* lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
      	wrapping
      
      From-SVN: r269934
      Martin Liska committed
    • re PR c++/89796 (Incorrect warning generated with OpenMP atomic capture) · 22a32ea0
      	PR c++/89796
      	* semantics.c (finish_omp_atomic): Add warning_sentinel for
      	-Wunused-value around finish_expr_stmt call.
      
      	* g++.dg/gomp/pr89796.C: New test.
      	* gcc.dg/gomp/pr89796.c: New test.
      
      From-SVN: r269933
      Jakub Jelinek committed
    • [RS6000] Fix typos · 7a03cad7
      	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Correct
      	rs6000_vector_mem init.  Correct wI and wJ comment
      
      From-SVN: r269932
      Alan Modra committed
    • Daily bump. · 4d7e3ed9
      From-SVN: r269931
      GCC Administrator committed
  3. 25 Mar, 2019 12 commits