Andreas Krebbel [Tue, 2 Apr 2019 11:02:22 +0000 (11:02 +0000)]
S/390: arch13: vec_reve element order reversal builtins
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtin-types.def: Add new builtin function type.
* config/s390/s390-builtins.def: Add overloaded builtin
s390_vec_reve and low-level builtins for s390_vler and s390_vster.
* config/s390/s390.md (UNSPEC_VEC_ELTSWAP): New constant definition.
* config/s390/vecintrin.h (vec_reve): New builtin name definition.
* config/s390/vx-builtins.md (V_HW_HSD): New mode iterator.
("eltswap<mode>"): New expander.
("*eltswapv16qi", "*eltswap<mode>", "*eltswap<mode>_emu"): New
insn definitions.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/zvector/vec-reve-load-byte-z14.c: New test.
* gcc.target/s390/zvector/vec-reve-load-byte.c: New test.
* gcc.target/s390/zvector/vec-reve-load-halfword-z14.c: New test.
* gcc.target/s390/zvector/vec-reve-load-halfword.c: New test.
* gcc.target/s390/zvector/vec-reve-store-byte-z14.c: New test.
* gcc.target/s390/zvector/vec-reve-store-byte.c: New test.
From-SVN: r270085
Andreas Krebbel [Tue, 2 Apr 2019 11:01:06 +0000 (11:01 +0000)]
S/390: arch13: vec_revb vector byte swap builtin
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtin-types.def: Add new builtin function types.
* config/s390/s390-builtins.def: Add overloaded builtin
s390_vec_revb. Add low-level builtins for vlbr and vstbr
instructions.
* config/s390/vecintrin.h (vec_revb): New builtin name definition.
* config/s390/vector.md (VT_HW_HSDT): New mode iterator.
("bswap<mode>"): New expander.
("*bswap<mode>", "*bswap<mode>_emu"): New insn definitions.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/zvector/vec-revb-load-double-z14.c: New test.
* gcc.target/s390/zvector/vec-revb-load-double.c: New test.
* gcc.target/s390/zvector/vec-revb-store-double-z14.c: New test.
* gcc.target/s390/zvector/vec-revb-store-double.c: New test.
From-SVN: r270084
Andreas Krebbel [Tue, 2 Apr 2019 10:59:30 +0000 (10:59 +0000)]
S/390: arch13: New vector builtins - preparation
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtins.def (B_VXE2): New builtin flag definition.
* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Increment
vector builtin version number in __VEC__.
From-SVN: r270083
Andreas Krebbel [Tue, 2 Apr 2019 10:58:33 +0000 (10:58 +0000)]
S/390: arch13: Support 32 bit fp-int scalar converts
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md (VX_CONV_BFP, VX_CONV_INT): New mode
iterators.
(SFSI): New mode attribute.
("*fixuns_truncdfdi2_vx", "*fix_truncdfdi2_bfp_z13")
("*floatunsdidf2_z13", ): Add support for 32 bit conversions and
rename to ...
("*fixuns_trunc<VX_CONV_BFP:mode><VX_CONV_INT:mode>2_z13")
("*fix_trunc<VX_CONV_BFP:mode><VX_CONV_INT:mode>2_bfp_z13")
("*floatuns<VX_CONV_INT:mode><VX_CONV_BFP:mode>2_z13"): ... these.
("floatsi<mode>2"): Add wcefb instruction.
From-SVN: r270082
Andreas Krebbel [Tue, 2 Apr 2019 10:57:39 +0000 (10:57 +0000)]
S/390: arch13: Support 32 bit fp-int vector converts
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md ("xde"): Extend mode attribute to vector
types.
* config/s390/vector.md (VX_VEC_CONV_BFP, VX_VEC_CONV_INT): New
mode iterators.
("floatv2div2df2", "floatunsv2div2df2", "fix_truncv2dfv2di2")
("fixuns_truncv2dfv2di2"): Enhance with mode iterator to also
support 32 bit fp-int conversions. Rename to ...
("float<VX_VEC_CONV_INT:mode><VX_VEC_CONV_BFP:mode>2")
("floatuns<VX_VEC_CONV_INT:mode><VX_VEC_CONV_BFP:mode>2")
("fix_trunc<VX_VEC_CONV_BFP:mode><VX_VEC_CONV_INT:mode>2")
("fixuns_trunc<VX_VEC_CONV_BFP:mode><VX_VEC_CONV_INT:mode>2"):
... to these.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/arch13/fp-signedint-convert-1.c: New test.
* gcc.target/s390/arch13/fp-unsignedint-convert-1.c: New test.
From-SVN: r270081
Andreas Krebbel [Tue, 2 Apr 2019 10:56:34 +0000 (10:56 +0000)]
S/390: arch13: Add support for new select instruction
Compared to the load on condition instructions we already have the new
select instruction allows to have a THEN and and ELSE source operand -
but only for register to register loads.
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_rtx_costs): Do not add extra costs for
if-then-else constructs if we can use the select instruction.
* config/s390/s390.md ("*mov<mode>cc"): Add the new instructions.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/arch13/sel-1.c: New test.
From-SVN: r270080
Andreas Krebbel [Tue, 2 Apr 2019 10:55:26 +0000 (10:55 +0000)]
S/390: arch13: Support new popcount instruction
variant.
The new arch13 popcount instruction counts bits in the entire 64 bit
register instead of just in 8 bit portions.
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md ("*popcountdi_arch13_cc")
("*popcountdi_arch13_cconly", "*popcountdi_arch13"): New insn
definition.
("*popcount<mode>", "popcountdi2", "popcountsi2", "popcounthi2"):
Append _z196 to make it ...
("*popcount<mode>_z196", "popcountdi2_z196", "popcountsi2_z196")
("popcounthi2_z196"): ... this.
("popcountdi2_z196"): Remove TARGET_64BIT from the insn condition.
("popcountdi2", "popcountsi2", "popcounthi2"): New expanders.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/arch13/popcount-1.c: New test.
From-SVN: r270079
Andreas Krebbel [Tue, 2 Apr 2019 10:51:53 +0000 (10:51 +0000)]
S/390: arch13: Support new bit operations
Make use of the new bit operation instructions when generating code
for the arch13 level.
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_canonicalize_comparison): Convert
certain compares for arch13 in order to make use of the condition
code result produced by the new instructions.
(s390_rtx_costs): Adjust the costs for nnrk, nngrk, nork, nogrk,
nxrk, and nxgrk instruction patterns.
* config/s390/s390.md (ANDOR, bitops_name, inv_bitops_name)
(inv_no): Add new code iterator together with some attributes.
("*andc_split_<mode>"): Disable splitter for arch13.
("*<ANDOR:bitops_name>c<GPR:mode>_cc")
("*<ANDOR:bitops_name>c<GPR:mode>_cconly")
("*<ANDOR:bitops_name>c<GPR:mode>")
("*n<ANDOR:inv_bitops_name><GPR:mode>_cc")
("*n<ANDOR:inv_bitops_name><mode>_cconly")
("*n<ANDOR:inv_bitops_name><mode>", "*nxor<GPR:mode>_cc")
("*nxor<mode>_cconly", "*nxor<mode>"): New insn definitions.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/arch13/bitops-1.c: New test.
* gcc.target/s390/arch13/bitops-2.c: New test.
* gcc.target/s390/md/andc-splitter-1.c: Add -march=z14 build
option and adjust line numbers.
* gcc.target/s390/md/andc-splitter-2.c: Likewise.
From-SVN: r270078
Andreas Krebbel [Tue, 2 Apr 2019 10:50:03 +0000 (10:50 +0000)]
S/390: arch13: Add arch13 as architecture option
This patch enables the command line options and provides the proper
macros for checking.
gcc/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* common/config/s390/s390-common.c (processor_flags_table): New
entry for arch13.
* config.gcc: Support arch13 with the --with-arch= configure flag.
* config/s390/driver-native.c (s390_host_detect_local_cpu):
* config/s390/s390-opts.h (enum processor_type): Add PROCESSOR_ARCH13.
* config/s390/s390.c (s390_get_sched_attrmask)
(s390_get_unit_mask): Add PROCESSOR_ARCH13.
* config/s390/s390.h (enum processor_flags): Add PF_VXE2 and PF_ARCH13.
* config/s390/s390.md (TARGET_CPU_ARCH13, TARGET_CPU_ARCH13_P)
(TARGET_CPU_VXE2, TARGET_CPU_VXE2_P, TARGET_ARCH13)
(TARGET_ARCH13_P, TARGET_VXE2, TARGET_VXE2_P): New macro
definitions.
* config/s390/s390.opt: Support arch13 as processor type in
command line options.
gcc/testsuite/ChangeLog:
2019-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/s390.exp: Run tests in arch13 subdir.
* lib/target-supports.exp (check_effective_target_s390_vxe2): New
runtime check for the vxe2 hardware feature on IBM Z.
From-SVN: r270077
Martin Liska [Tue, 2 Apr 2019 07:55:30 +0000 (09:55 +0200)]
Fix param description of graphite-max-arrays-per-scop (PR translation/89912).
2019-04-02 Martin Liska <mliska@suse.cz>
PR translation/89912
* params.def (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP):
Fix param description of graphite-max-arrays-per-scop.
From-SVN: r270076
Eric Botcazou [Tue, 2 Apr 2019 07:40:30 +0000 (07:40 +0000)]
linux64.h (ASAN_REJECT_SPEC): New macro.
* config/sparc/linux64.h (ASAN_REJECT_SPEC): New macro.
(ASAN_CC1_SPEC): Use it in 64-bit mode.
* config/sparc/sol2.h (ASAN_REJECT_SPEC): Remove superfluous colon.
From-SVN: r270075
Iain Buclaw [Tue, 2 Apr 2019 05:23:20 +0000 (05:23 +0000)]
re PR d/89823 (Composed message only partially translatable)
gcc/po/ChangeLog:
2019-04-02 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/89823
* EXCLUDES: Update list of d/dmd sources.
* gcc.pot: Regenerated.
From-SVN: r270074
GCC Administrator [Tue, 2 Apr 2019 00:16:22 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270072
Joseph Myers [Mon, 1 Apr 2019 21:42:32 +0000 (22:42 +0100)]
* fr.po, sv.po: Update.
From-SVN: r270069
Jason Merrill [Mon, 1 Apr 2019 20:43:13 +0000 (16:43 -0400)]
PR c++/86946 - ICE with function call in template argument.
DR 1321 clarified that two dependent names are equivalent if the names are
the same, even if the result of name lookup is different. We need to
implement that in hashing like we already do in comparison and mangling.
* pt.c (iterative_hash_template_arg) [CALL_EXPR]: Use
dependent_name.
From-SVN: r270068
H.J. Lu [Mon, 1 Apr 2019 18:34:00 +0000 (18:34 +0000)]
Check avx2_available in check_avx2_available
check_avx2_available should check avx2_available, instead of avx_available.
Otherwise, check_avx2_available may use result from check_avx_available.
PR testsuite/89907
* lib/target-supports.exp (check_avx2_available): Replace
avx_available with avx2_available.
From-SVN: r270066
Andrey Belevantsev [Mon, 1 Apr 2019 18:05:08 +0000 (21:05 +0300)]
sel-sched: correct reset of reset_sched_cycles_p (PR 85412)
2019-04-01 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/85412
* sel-sched.c (sel_sched_region): Assign reset_sched_cycles_p before
sel_sched_region_1, not after.
* gcc.dg/pr85412.c: New test.
From-SVN: r270065
Paolo Carlini [Mon, 1 Apr 2019 17:09:47 +0000 (17:09 +0000)]
re PR c++/62207 (ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in tsubst_copy, at cp/pt.c)
/cp
2019-04-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62207
* pt.c (tsubst_copy): Deal with lookup_name not returing a variable.
/testsuite
2019-04-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62207
* g++.dg/template/crash130.C: New.
* g++.dg/template/crash131.C: Likewise.
From-SVN: r270064
Martin Sebor [Mon, 1 Apr 2019 17:04:10 +0000 (17:04 +0000)]
PR c/89685 - ICE on attribute copy with a compound expression
gcc/c-family/ChangeLog:
PR c/89685
* c-attribs.c (handle_copy_attribute): Handle references and
non-constant expressions.
gcc/testsuite/ChangeLog:
PR c/89685
* gcc.dg/attr-copy-8.c: New test.
* g++.dg/ext/attr-copy-2.C: New test.
From-SVN: r270062
Andrey Belevantsev [Mon, 1 Apr 2019 16:32:24 +0000 (19:32 +0300)]
sel-sched: update liveness in redirect_edge_and_branch hooks (PR 86928)
2019-04-01 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/86928
* sel-sched-ir.c (sel_redirect_edge_and_branch_force): Invoke
compute_live if necessary.
(sel_redirect_edge_and_branch): Likewise.
* gcc.dg/pr86928.c: New test.
From-SVN: r270061
Vladimir Makarov [Mon, 1 Apr 2019 16:18:30 +0000 (16:18 +0000)]
re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times \\\\), % 45)
2019-04-01 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/89865
* ira-costs.c (process_bb_node_for_hard_reg_moves): Skip hard
register if it is a part of small class.
From-SVN: r270060
Andrey Belevantsev [Mon, 1 Apr 2019 15:20:13 +0000 (18:20 +0300)]
sel-sched: remove assert in merge_fences (PR 87273)
2019-04-01 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/87273
* sel-sched-ir.c (merge_fences): Remove assert.
* gcc.dg/pr87273.c: New test.
From-SVN: r270059
Iain Buclaw [Mon, 1 Apr 2019 14:44:04 +0000 (14:44 +0000)]
re PR d/88462 (All D execution tests FAIL on Solaris/SPARC)
PR d/88462
libphobos: Fix abort in pthread_mutex_init on Solaris.
Merges upstream druntime
d57fa1ff.
Reviewed-on: https://github.com/dlang/druntime/pull/2534
From-SVN: r270057
Ville Voutilainen [Mon, 1 Apr 2019 13:57:41 +0000 (16:57 +0300)]
Use single-visitation in variant assignment and swap and relops.
Also use indices instead of types when checking whether
variants hold the same thing.
* include/std/variant (__do_visit): Add a template parameter
for index visitation, invoke with indices if index visitation
is used.
(__variant_idx_cookie): New.
(__visit_with_index): Likewise.
(_Copy_assign_base::operator=): Do single-visitation with
an index visitor.
(_Move_assign_base::operator=): Likewise.
(_Extra_visit_slot_needed): Adjust.
(__visit_invoke): Call with indices if it's an index visitor.
(relops): Do single-visitation with an index visitor.
(swap): Likewise.
(__visitor_result_type): New.
From-SVN: r270056
Richard Biener [Mon, 1 Apr 2019 11:36:25 +0000 (11:36 +0000)]
re PR tree-optimization/46590 (long compile time with -O2 and many loops)
2019-04-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/46590
* domwalk.h (dom_walker::dom_walker): Consolidate constructors.
(dom_walker::m_reachability): Add in place of...
(dom_walker::m_skip_unreachable_blocks): ...this.
* domwalk.c (dom_walker::dom_walker): Consoliate constructors.
Move complex initialization ...
(dom_walker::walk): Here. Especially compute m_bb_to_rpo
lazily and initialize edge flags on each invocation.
(dom_walker::bb_reachable): Use m_reachability.
From-SVN: r270055
Martin Liska [Mon, 1 Apr 2019 07:17:38 +0000 (09:17 +0200)]
Enhance option suggestion for options expected an argument (PR driver/89861).
2019-04-01 Martin Liska <mliska@suse.cz>
PR driver/89861
* opt-suggestions.c (option_proposer::build_option_suggestions):
Add variant without any argument in order to provide better
hints.
2019-04-01 Martin Liska <mliska@suse.cz>
PR driver/89861
* gcc.dg/spellcheck-options-18.c: New test.
* gcc.dg/spellcheck-options-19.c: New test.
* gcc.dg/spellcheck-options-20.c: New test.
* gcc.dg/spellcheck-options-13.c: Adjust expected output.
* gcc.dg/completion-2.c: Add one variant with no argument.
From-SVN: r270053
Richard Biener [Mon, 1 Apr 2019 07:16:38 +0000 (07:16 +0000)]
re PR c/71598 (Wrong optimization with aliasing enums)
2019-04-01 Richard Biener <rguenther@suse.de>
PR c/71598
* gimple.c: Include langhooks.h.
(gimple_get_alias_set): Treat enumeral types as the underlying
integer type.
c/
* c-tree.h (c_get_alias_set): Declare.
* c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
* c-objc-common.c (c_get_alias_set): Treat enumeral types
as the underlying integer type.
* gcc.dg/torture/pr71598-1.c: New testcase.
* gcc.dg/torture/pr71598-2.c: Likewise.
* gcc.dg/torture/pr71598-3.c: Likewise.
From-SVN: r270052
GCC Administrator [Mon, 1 Apr 2019 00:16:21 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270051
Marek Polacek [Sun, 31 Mar 2019 20:37:22 +0000 (20:37 +0000)]
PR c++/89852 - ICE with C++11 functional cast with { }.
* constexpr.c (fold_non_dependent_expr_template): New static function
broken out of...
(fold_non_dependent_expr): ...here.
(fold_non_dependent_init): New function.
* cp-tree.h (fold_non_dependent_init): Declare.
* typeck2.c (massage_init_elt): Call fold_non_dependent_init instead
of fold_non_dependent_expr. Don't call maybe_constant_init.
* g++.dg/cpp0x/initlist115.C: New test.
From-SVN: r270048
Harald Anlauf [Sun, 31 Mar 2019 18:33:51 +0000 (18:33 +0000)]
re PR fortran/83515 (ICE: Invalid expression in gfc_element_size)
2019-03-31 Harald Anlauf <anlauf@gmx.de>
PR fortran/83515
PR fortran/85797
* trans-types.c (gfc_typenode_for_spec): Handle conversion for
procedure pointers.
* target-memory.c (gfc_element_size): Handle size determination
for procedure pointers.
PR fortran/83515
PR fortran/85797
* gfortran.dg/pr85797.f90: New test.
From-SVN: r270045
Thomas Koenig [Sun, 31 Mar 2019 15:21:10 +0000 (15:21 +0000)]
dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref * arguments.
2019-03-31 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (debug): Add for symbol_attribute *,
symbol_attribute and gfc_ref * arguments.
From-SVN: r270044
Iain Buclaw [Sun, 31 Mar 2019 14:34:41 +0000 (14:34 +0000)]
d: Fix run-time SIGSEGV reading ModuleInfo.flags()
The current forced alignment is not necessary, and is problematic on
targets that have strict alignment rules.
gcc/d/ChangeLog:
2019-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/88462
* modules.cc (layout_moduleinfo_fields): Properly align ModuleInfo,
instead of forcing alignment to be 1.
From-SVN: r270043
Rainer Orth [Sun, 31 Mar 2019 09:26:22 +0000 (09:26 +0000)]
Enable gcc.dg/attr-aligned-3.c on Solaris
* gcc.dg/attr-aligned-3.c: Enable on *-*-solaris2.*.
From-SVN: r270042
GCC Administrator [Sun, 31 Mar 2019 00:16:29 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270041
Iain Buclaw [Sat, 30 Mar 2019 22:10:12 +0000 (22:10 +0000)]
testsuite/gdc.test: Merge upstream dmd
5dd3eccc3
The D2 testsuite script has been updated to handle EXTRA_SOURCES and
EXTRA_FILES settings being split across multiple lines, which is how
they appear in upstream.
Reviewed-on: https://github.com/dlang/dmd/pull/9517
gcc/testsuite/ChangeLog:
2019-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
* gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to
cleanup_extra_files.
(dmd2dg): Copy additional files after test is processed.
(gdc-do-test): Remove all copied files after test.
From-SVN: r270038
Paul Thomas [Sat, 30 Mar 2019 15:39:00 +0000 (15:39 +0000)]
re PR fortran/89841 (improper descriptor information passed to C)
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89841
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
argument attributes rather than those of the actual argument.
PR fortran/89842
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
'set_dtype_for_unallocated' for any type of arrayspec.
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89841
* gfortran.dg/ISO_Fortran_binding_1.f90: Change the interfaces
for c_deallocate, c_allocate and c_assumed_size so that the
attributes of the array arguments are correct and are typed.
* gfortran.dg/ISO_Fortran_binding_7.f90: New test.
* gfortran.dg/ISO_Fortran_binding_7.c: Additional source.
PR fortran/89842
* gfortran.dg/ISO_Fortran_binding_8.f90: New test.
* gfortran.dg/ISO_Fortran_binding_8.c: Additional source.
From-SVN: r270037
Jason Merrill [Sat, 30 Mar 2019 15:23:37 +0000 (11:23 -0400)]
PR c++/89744 - ICE with specialization of member class template.
My fix five years ago for PR 60241 was incomplete: when we reassign implicit
instances of a partial instantiation of a member template to the explicit
specialization of that partial instantiation, we also need to adjust the
CLASSTYPE_TI_ARGS to match what we'd get when looking up that instance after
the explicit specialization. We also need to do this when we later look up
the instance in a way that only finds the explicit specialization halfway
through lookup_template_class_1.
* pt.c (lookup_template_class_1): If the partial instantiation is
explicitly specialized, adjust.
(maybe_process_partial_specialization): Also adjust
CLASSTYPE_TI_ARGS.
From-SVN: r270036
Thomas Koenig [Sat, 30 Mar 2019 13:41:10 +0000 (13:41 +0000)]
re PR fortran/89866 ([F08] wrong-code problem with POINTER, INTENT(IN) argument)
2019-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89866
* gfortran.dg/pointer_intent_8.f90: New test.
From-SVN: r270034
Eric Botcazou [Sat, 30 Mar 2019 13:36:16 +0000 (13:36 +0000)]
* src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
From-SVN: r270033
Kugan Vivekanandarajah [Sat, 30 Mar 2019 04:24:22 +0000 (04:24 +0000)]
re PR rtl-optimization/89862 (LTO bootstrap fails for ARM)
2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/89862
* rtl.h (word_register_operation_p): Exclude CONST_INT from operations
that operates on the full registers for WORD_REGISTER_OPERATIONS
architectures.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r270030
GCC Administrator [Sat, 30 Mar 2019 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270029
Jim Wilson [Fri, 29 Mar 2019 21:51:58 +0000 (21:51 +0000)]
RISC-V: Fix __riscv_compressed regression.
This was accidentally broken by the patch adding ELF attribute support.
The __riscv_compressed predefined macro is not being defined when the
target supports the C extension. The fix adds testcases to verify that
all of the predefined macros are correct for various option combinations.
gcc/
* common/config/riscv/riscv-common.c (riscv_parse_arch_string):
Clear MASK_RVC and then set if C subset supported.
gcc/testsuite/
* gcc.target/riscv/predef-1.c: New.
* gcc.target/riscv/predef-2.c: New.
* gcc.target/riscv/predef-3.c: New.
* gcc.target/riscv/predef-4.c: New.
* gcc.target/riscv/predef-5.c: New.
* gcc.target/riscv/predef-6.c: New.
* gcc.target/riscv/predef-7.c: New.
* gcc.target/riscv/predef-8.c: New.
From-SVN: r270026
Jakub Jelinek [Fri, 29 Mar 2019 20:51:15 +0000 (21:51 +0100)]
re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times \\\\), % 45)
PR rtl-optimization/89865
* gcc.target/i386/pr49095.c: Include in scan-assembler-times patterns
the first argument register, so that occassional spills/fills are
ignored.
From-SVN: r270025
Jakub Jelinek [Fri, 29 Mar 2019 20:10:19 +0000 (21:10 +0100)]
re PR sanitizer/89869 (-fsanitize=undefined miscompilation)
PR sanitizer/89869
* typeck.c: Include gimplify.h.
(cp_build_modify_expr) <case COND_EXPR>: Unshare rhs before using it
for second time. Formatting fixes.
* g++.dg/ubsan/vptr-14.C: New test.
From-SVN: r270024
Jakub Jelinek [Fri, 29 Mar 2019 19:32:20 +0000 (20:32 +0100)]
re PR c/89872 (GCC does not generate read access to volatile compound literal)
PR c/89872
* gimplify.c (gimplify_compound_literal_expr): Don't optimize a
non-addressable complit into its initializer if it is volatile.
* gcc.dg/tree-ssa/pr89872.c: New test.
From-SVN: r270023
Roman Zhuykov [Fri, 29 Mar 2019 18:44:01 +0000 (18:44 +0000)]
opts-common.c (integral_argument): Set errno properly in one case.
* opts-common.c (integral_argument): Set errno properly in one case.
* gcc.dg/diag-sanity.c: New test.
From-SVN: r270022
Marek Polacek [Fri, 29 Mar 2019 18:40:31 +0000 (18:40 +0000)]
PR c++/89876 - ICE with deprecated conversion.
* call.c (convert_like_real): Only give warnings with tf_warning.
* g++.dg/warn/conv5.C: New test.
From-SVN: r270021
Marek Polacek [Fri, 29 Mar 2019 15:24:00 +0000 (15:24 +0000)]
re PR c++/89871 (Wall + designated initializers)
PR c++/89871
* g++.dg/cpp2a/desig14.C: New test.
From-SVN: r270019
Martin Liska [Fri, 29 Mar 2019 14:53:12 +0000 (15:53 +0100)]
Remove -Wchkp from documentation.
2019-03-29 Martin Liska <mliska@suse.cz>
* doc/invoke.texi: Remove -Wchkp from documentation.
From-SVN: r270017
Martin Liska [Fri, 29 Mar 2019 11:45:56 +0000 (12:45 +0100)]
Dump -fdbg-cnt limit reach also to stderr stream.
2019-03-29 Martin Liska <mliska@suse.cz>
* dbgcnt.c (print_limit_reach): New function.
(dbg_cnt): Use it.
2019-03-29 Martin Liska <mliska@suse.cz>
* gcc.dg/ipa/ipa-icf-39.c: Prine '***dbgcnt' output.
* gcc.dg/pr68766.c: Likewise.
From-SVN: r270015
Martin Liska [Fri, 29 Mar 2019 11:45:39 +0000 (12:45 +0100)]
Fix multiple values for -fdbg-cnt.
2019-03-29 Martin Liska <mliska@suse.cz>
* dbgcnt.c (dbg_cnt_process_single_pair): Fix GNU coding style.
(dbg_cnt_process_opt): Parse first tokens aas
dbg_cnt_process_single_pair is also using strtok.
From-SVN: r270014
Jakub Jelinek [Fri, 29 Mar 2019 11:42:51 +0000 (12:42 +0100)]
re PR rtl-optimization/87485 (Compile time hog w/ -O2 -fschedule-insns -fno-guess-branch-probability -fno-isolate-erroneous-paths-dereference -fno-omit-frame-pointer -fno-split-wide-types -fno-tree-ccp -fno-tree-sra)
PR rtl-optimization/87485
* function.c (expand_function_end): Move stack_protect_epilogue
before loading of return value into hard register(s).
* gcc.dg/pr87485.c: New test.
From-SVN: r270013
GCC Administrator [Fri, 29 Mar 2019 00:16:31 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270012
Jakub Jelinek [Thu, 28 Mar 2019 22:33:29 +0000 (23:33 +0100)]
re PR middle-end/89621 (ICE with allocatable character and openmp)
PR middle-end/89621
* tree-inline.h (struct copy_body_data): Add
dont_remap_vla_if_no_change flag.
* tree-inline.c (remap_type_3, remap_type_2): New functions.
(remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change
and remap_type_2 returns false.
* omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change.
Move ctx->cb.adjust_array_error_bounds setting to the outermost ctx
only from where it is copied to nested contexts.
* gfortran.dg/gomp/pr89621.f90: New test.
From-SVN: r270009
Martin Sebor [Thu, 28 Mar 2019 21:32:11 +0000 (21:32 +0000)]
PR c++/66548 - Invalid class member access expression in decltype sometimes
PR c++/66548 - Invalid class member access expression in decltype sometimes
accepted
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/decltype-pr66548.C: New test.
From-SVN: r270007
Martin Sebor [Thu, 28 Mar 2019 21:20:18 +0000 (21:20 +0000)]
PR c++/81506 - Invalid declaration with decltype accepted
testsuite/ChangeLog:
* g++.dg/cpp0x/decltype-pr81506.C: New test.
From-SVN: r270006
Marek Polacek [Thu, 28 Mar 2019 20:24:48 +0000 (20:24 +0000)]
PR c++/89612 - ICE with member friend template with noexcept.
* pt.c (maybe_instantiate_noexcept): For function templates, use their
template result (function decl). Don't set up local specializations.
Temporarily turn on processing_template_decl. Update the template type
too.
* g++.dg/cpp0x/noexcept38.C: New test.
* g++.dg/cpp0x/noexcept39.C: New test.
* g++.dg/cpp1z/noexcept-type21.C: New test.
From-SVN: r270005
Uros Bizjak [Thu, 28 Mar 2019 19:33:22 +0000 (20:33 +0100)]
re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times \\\\), % 45)
PR target/89865
* config/i386/i386.md (RMW operation with LEA peephole):
Use LEAMODE mode attribute instead of SWI mode iterator for
LEA pattern.
From-SVN: r270004
Uros Bizjak [Thu, 28 Mar 2019 19:15:58 +0000 (20:15 +0100)]
re PR target/89848 (ICE: in convert_op, at config/i386/i386.c:2099 with -O2 -msse2 -mtune=pentium3m)
PR target/89848
* config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
Also process XEXP (src, 0) of a shift insn.
testsuite/ChangeLog:
PR target/89848
* gcc.target/i386/pr89848.c: New test.
From-SVN: r270003
Marek Polacek [Thu, 28 Mar 2019 18:23:18 +0000 (18:23 +0000)]
PR c++/89836 - bool constant expression and explicit conversions.
* call.c (build_converted_constant_expr_internal): New function,
renamed from...
(build_converted_constant_expr): ...this. New.
(build_converted_constant_bool_expr): New.
* cp-tree.h (build_converted_constant_bool_expr): Declare.
* decl.c (build_explicit_specifier): Call
build_converted_constant_bool_expr.
* g++.dg/cpp2a/explicit15.C: New test.
From-SVN: r270002
Jakub Jelinek [Thu, 28 Mar 2019 17:14:05 +0000 (18:14 +0100)]
re PR c/89812 (incorrect maximum in error: requested alignment ‘
536870912’ exceeds maximum
2147483648)
PR c/89812
* gcc.dg/attr-aligned-3.c: Limit the test to known ELF targets
other than AVR. Add dg-options "".
From-SVN: r270001
Ville Voutilainen [Thu, 28 Mar 2019 16:18:49 +0000 (18:18 +0200)]
Don't revisit a variant we are already visiting.
* include/std/variant (__variant_construct_single): New.
(__variant_construct): Use it.
(_M_destructive_move): Likewise.
(_M_destructive_copy): Likewise.
(_Copy_assign_base::operator=): Adjust.
(_Move_assign_base::operator=): Likewise.
(swap): Likewise.
From-SVN: r269996
Jakub Jelinek [Thu, 28 Mar 2019 14:47:47 +0000 (15:47 +0100)]
re PR c++/89785 (Incorrect "not a constant expression" error with switch statement that returns)
PR c++/89785
* constexpr.c (struct check_for_return_continue_data): New type.
(check_for_return_continue): New function.
(potential_constant_expression_1) <case SWITCH_STMT>: Walk
SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
in loop bodies and set *jump_target to that if found.
* g++.dg/cpp1y/constexpr-89785-1.C: New test.
* g++.dg/cpp1y/constexpr-89785-2.C: New test.
From-SVN: r269995
David Malcolm [Thu, 28 Mar 2019 14:40:56 +0000 (14:40 +0000)]
optinfo-emit-json.cc: don't call get_fnname_from_decl (PR middle-end/89725)
optrecord_json_writer::optinfo_to_json can in theory be called from any
optimization pass, but currently uses get_fnname_from_decl, which
is RTL-specific.
In that PR, Jakub suggested using either DECL_ASSEMBLER_NAME or the
"printable name" (via current_function_name).
This patch makes it use DECL_ASSEMBLER_NAME.
gcc/ChangeLog:
PR middle-end/89725
* optinfo-emit-json.cc (optrecord_json_writer::optinfo_to_json):
Use DECL_ASSEMBLER_NAME rather than get_fnname_from_decl.
From-SVN: r269994
Jakub Jelinek [Thu, 28 Mar 2019 14:20:10 +0000 (15:20 +0100)]
regcprop.c (copyprop_hardreg_forward_1): Remove redundant INSN_P test.
* regcprop.c (copyprop_hardreg_forward_1): Remove redundant INSN_P
test.
(cprop_hardreg_bb, cprop_hardreg_debug): New functions.
(pass_cprop_hardreg::execute): Use those. Don't repeat bb processing
immediately after first one with df_analyze in between, but rather
process all bbs, queueing ones that need second pass in a worklist,
df_analyze, process queued debug insn changes and if second pass is
needed, process bbs from worklist, df_analyze, process queued debug
insns again.
From-SVN: r269992
Jakub Jelinek [Thu, 28 Mar 2019 14:07:40 +0000 (15:07 +0100)]
rtl.h (NONDEBUG_INSN_P): Define as NONJUMP_INSN_P or JUMP_P or CALL_P instead of INSN_P && !DEBUG_INSN_P.
* rtl.h (NONDEBUG_INSN_P): Define as NONJUMP_INSN_P or JUMP_P
or CALL_P instead of INSN_P && !DEBUG_INSN_P.
(INSN_P): Define using NONDEBUG_INSN_P or DEBUG_INSN_P.
From-SVN: r269991
Jonathan Wakely [Thu, 28 Mar 2019 13:42:48 +0000 (13:42 +0000)]
PR c/79022 fix mismatch parameter order in declaratio
The declaration of create_nested_ptr_option in the header has the 'from'
and 'to' parameters in the opposite order from the definition in
gengtype.c:
/* Return an options structure for a "nested_ptr" option. */
options_p
create_nested_ptr_option (options_p next, type_p t,
const char *to, const char *from)
and the only caller in gengtype-parse.c:
return create_nested_ptr_option (prev, ty, to, from);
This patch swaps the parameter names in the declaration.
PR c/79022
* gengtype.h (create_nested_ptr_option): Fix parameter names to match
definition.
From-SVN: r269990
Martin Liska [Thu, 28 Mar 2019 08:44:44 +0000 (09:44 +0100)]
Revert r254150 (PR bootstrap/89829).
2019-03-28 Martin Liska <mliska@suse.cz>
PR bootstrap/89829
* Makefile.in: Revert r254150.
* Makefile.tpl: Likewise.
From-SVN: r269985
Ben Elliston [Thu, 28 Mar 2019 06:55:57 +0000 (17:55 +1100)]
MAINTAINERS (Various Maintainers): Remove myself from dfp.c and related, and libdecnumber.
* MAINTAINERS (Various Maintainers): Remove myself from dfp.c and
related, and libdecnumber.
From-SVN: r269984
GCC Administrator [Thu, 28 Mar 2019 00:16:26 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r269983
Janus Weil [Wed, 27 Mar 2019 22:40:22 +0000 (23:40 +0100)]
re PR fortran/85537 ([F08] Invalid memory reference at runtime when calling subroutine through procedure pointer)
fix PR 85537
2019-03-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/85537
* expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
in procedure pointer initialization.
2019-03-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/85537
* gfortran.dg/dummy_procedure_11.f90: Fix test case.
* gfortran.dg/pointer_init_11.f90: New test case.
From-SVN: r269980
Mateusz B [Wed, 27 Mar 2019 21:17:48 +0000 (22:17 +0100)]
re PR target/85667 (ms_abi rules aren't followed when returning short structs with float values)
PR target/85667
* config/i386/i386.c (ix86_function_value_1): Call the newly added
function for 32-bit MS_ABI.
(function_value_ms_32): New function.
testsuite/ChangeLog:
PR target/85667
* gcc.target/i386/pr85667-5.c: New testcase.
* gcc.target/i386/pr85667-6.c: New testcase.
From-SVN: r269979
Bill Schmidt [Wed, 27 Mar 2019 20:39:22 +0000 (20:39 +0000)]
pr81740-2.c: Require vect_hw_misalign.
2019-03-27 Bill Schmidt <wschmidt@linux.ibm.com>
* gcc.dg/vect/pr81740-2.c: Require vect_hw_misalign.
From-SVN: r269978
Jason Merrill [Wed, 27 Mar 2019 20:39:19 +0000 (16:39 -0400)]
PR c++/89831 - error with qualified-id in const member function.
Since the fix for 15272 we were remembering the wrong function to use at
instantiation time, because the type of the SCOPE_REF didn't reflect the
cv-quals of 'this'. Conveniently, we can fix this by simplifying the code.
* semantics.c (finish_non_static_data_member): Use object cv-quals
in scoped case, too.
From-SVN: r269977
Jason Merrill [Wed, 27 Mar 2019 19:26:17 +0000 (15:26 -0400)]
Fix ChangeLog
From-SVN: r269976
Jason Merrill [Wed, 27 Mar 2019 18:39:20 +0000 (14:39 -0400)]
PR c++/89241 - ICE with lambda in template parameter list.
We were getting confused by a lambda in template definition context that
isn't actually in the scope of any templated entity. Fixed by telling
type_dependent_expression_p that such a lambda is type-dependent even if we
can't tell that from its closure type. I've also restored the error for
defining a non-lambda class in a default template argument, and for a lambda
befor C++20.
* parser.c (cp_parser_lambda_expression): Also reject a lambda in a
template parameter list before C++20.
* pt.c (type_dependent_expression_p): True for LAMBDA_EXPR.
* semantics.c (begin_class_definition): Restore error about defining
non-lambda class in template parm list.
From-SVN: r269972
Kevin Buettner [Wed, 27 Mar 2019 18:30:44 +0000 (18:30 +0000)]
team.c (gomp_team_start): Initialize pool->threads[0].
libgomp/ChangeLog:
* team.c (gomp_team_start): Initialize pool->threads[0].
From-SVN: r269971
Andrew Stubbs [Wed, 27 Mar 2019 17:06:26 +0000 (17:06 +0000)]
Fix scc clobber in movdi_symbol.
2019-03-27 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/gcn/gcn.md (CC_SAVE_REG): New constant.
(movdi): Call gen_movdi_symbol_save_scc.
(gen_movdi_symbol_save_scc): New insn and split.
From-SVN: r269970
Peter Bergner [Wed, 27 Mar 2019 16:59:15 +0000 (16:59 +0000)]
re PR rtl-optimization/89313 (ICE in process_alt_operands, at lra-constraints.c:2962)
gcc/
PR rtl-optimization/89313
* function.c (matching_constraint_num): New static function.
(match_asm_constraints_1): Use it. Fixup white space and comment.
Don't replace inputs with non-matching constraints which conflict
with early clobber outputs.
gcc/testsuite/
PR rtl-optimization/89313
* gcc.dg/pr89313.c: New test.
From-SVN: r269969
Jeff Law [Wed, 27 Mar 2019 16:18:06 +0000 (10:18 -0600)]
re PR rtl-optimization/87761 ([MIPS] New FAIL: gcc.target/mips/fix-r4000-10.c -O1 start with r265398)
PR rtl-optimization/87761
PR rtl-optimization/89826
* regcprop.c (copyprop_hardreg_forward_1): Move may_trap_p test
slightly later.
(pass_cprop_hardreg::execute): Call df_analyze after adding the
note problem to get REG_DEAD/REG_UNUSED notes updated.
PR rtl-optimization/87761
PR rtl-optimization/89826
* gcc.c-torture/execute/pr89826.c: New test.
From-SVN: r269967
Jason Merrill [Wed, 27 Mar 2019 14:27:00 +0000 (10:27 -0400)]
PR c++/86932 - missed SFINAE with empty pack.
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
Richard Biener [Wed, 27 Mar 2019 13:18:39 +0000 (13:18 +0000)]
20190327-1.c: New testcase.
2019-03-27 Richard Biener <rguenther@suse.de>
* gcc.dg/torture/
20190327-1.c: New testcase.
From-SVN: r269964
Paul Thomas [Wed, 27 Mar 2019 12:51:43 +0000 (12:51 +0000)]
re PR fortran/88247 (ICE in get_array_ctor_var_strlen, at fortran/trans-array.c:2068)
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
Richard Biener [Wed, 27 Mar 2019 09:31:53 +0000 (09:31 +0000)]
re PR debug/89463 (debug information for iterator of an empty loop is gone (at -O3))
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
Alan Modra [Wed, 27 Mar 2019 01:15:50 +0000 (11:45 +1030)]
[RS6000] Rename NON_SPECIAL_REGS to GEN_OR_FLOAT_REGS
* 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 [Wed, 27 Mar 2019 01:12:35 +0000 (11:42 +1030)]
[RS6000] Don't rely on rs6000_hard_regno_mode_ok being zero
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Always
assign rs6000_hard_regno_mode_ok_p[m][r]. Formatting.
From-SVN: r269959
GCC Administrator [Wed, 27 Mar 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r269958
Andrew Waterman [Tue, 26 Mar 2019 19:41:02 +0000 (19:41 +0000)]
RISC-V: Add sifive-7 pipeline description.
* 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
Uros Bizjak [Tue, 26 Mar 2019 18:59:14 +0000 (19:59 +0100)]
re PR target/89827 (ICE: in convert_op, at config/i386/i386.c:2098 with -Os -maes)
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
Rainer Orth [Tue, 26 Mar 2019 18:29:16 +0000 (18:29 +0000)]
Fix g++.dg/abi/lambda-static-1.C with Solaris as
* g++.dg/abi/lambda-static-1.C: Handle Solaris as comdat group
syntax.
From-SVN: r269952
Jason Merrill [Tue, 26 Mar 2019 16:02:19 +0000 (12:02 -0400)]
PR c++/86429 - constexpr variable in lambda.
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
Jonathan Wakely [Tue, 26 Mar 2019 15:28:48 +0000 (15:28 +0000)]
PR libstdc++/85965 delay static assertions until types are complete
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
Iain Buclaw [Tue, 26 Mar 2019 15:18:19 +0000 (15:18 +0000)]
libphobos: Backport extern(C) bindings from druntime 2.085.
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
Ville Voutilainen [Tue, 26 Mar 2019 15:00:05 +0000 (17:00 +0200)]
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
Richard Biener [Tue, 26 Mar 2019 14:56:30 +0000 (14:56 +0000)]
tree-inline.c (remap_gimple_stmt): Cache gimple_block.
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
Iain Buclaw [Tue, 26 Mar 2019 14:40:06 +0000 (14:40 +0000)]
d/dmd: Merge upstream dmd
ab702e73e
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
Jakub Jelinek [Tue, 26 Mar 2019 13:40:43 +0000 (14:40 +0100)]
hash-table.h (hash_table::m_gather_mem_stats): If GATHER_STATISTICS is constant 0...
* 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
Jason Merrill [Tue, 26 Mar 2019 13:38:53 +0000 (09:38 -0400)]
mem-stats.h (mem_alloc_description::unregister_descriptor): New method.
* 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
Ville Voutilainen [Tue, 26 Mar 2019 12:41:59 +0000 (14:41 +0200)]
re PR libstdc++/89824 (Variant jump table reserves space for __variant_cookie twice)
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 [Tue, 26 Mar 2019 12:07:26 +0000 (14:07 +0200)]
re PR libstdc++/89816 (std::variant move construction regressed since GCC 8.3)
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