Commit Graph

167785 Commits

Author SHA1 Message Date
GCC Administrator
416fcd3d45 Daily bump.
From-SVN: r269958
2019-03-27 00:16:16 +00:00
Andrew Waterman
88108b27dd 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
2019-03-26 12:41:02 -07:00
Uros Bizjak
a48d7fa698 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
2019-03-26 19:59:14 +01:00
Rainer Orth
9df23a66ce 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
2019-03-26 18:29:16 +00:00
Jason Merrill
c59fa7eac4 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
2019-03-26 12:02:19 -04:00
Jonathan Wakely
7ac205673c 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
2019-03-26 15:28:48 +00:00
Iain Buclaw
0da83a168f 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
2019-03-26 15:18:19 +00:00
Ville Voutilainen
da97b98ad3 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
2019-03-26 17:00:05 +02:00
Richard Biener
cf66c831c1 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
2019-03-26 14:56:30 +00:00
Iain Buclaw
ecbb1530e3 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
2019-03-26 14:40:06 +00:00
Jakub Jelinek
465b8e7f4e 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
2019-03-26 14:40:43 +01:00
Jason Merrill
a6f3616693 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
2019-03-26 14:38:53 +01:00
Ville Voutilainen
11767f80f0 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
2019-03-26 14:41:59 +02:00
Ville Voutilainen
8be4d02ba9 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
2019-03-26 14:07:26 +02:00
Bin Cheng
f30d4934a9 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
2019-03-26 11:12:37 +00:00
Iain Buclaw
a235c72e64 gdc-test.exp (gdc-do-test): Sort and remove duplicate options in permute args tests.
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
2019-03-26 11:02:42 +00:00
Paolo Carlini
d753399640 re PR c++/84598 (internal compiler error: Segmentation fault (cp_default_conversion()))
2019-03-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84598
	* g++.dg/ext/pr84598.C: New.

From-SVN: r269936
2019-03-26 10:16:13 +00:00
Martin Liska
139fc82090 Add missing dot.
From-SVN: r269935
2019-03-26 09:58:34 +00:00
Martin Liska
303389b1e5 Fix wrong option wrapping.
2019-03-26  Martin Liska  <mliska@suse.cz>

	* lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
	wrapping

From-SVN: r269934
2019-03-26 09:57:29 +00:00
Jakub Jelinek
22a32ea068 re PR c++/89796 (Incorrect warning generated with OpenMP atomic capture)
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
2019-03-26 08:54:02 +01:00
Alan Modra
7a03cad76c [RS6000] Fix typos
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Correct
	rs6000_vector_mem init.  Correct wI and wJ comment

From-SVN: r269932
2019-03-26 15:46:14 +10:30
GCC Administrator
4d7e3ed93d Daily bump.
From-SVN: r269931
2019-03-26 00:16:30 +00:00
Jeff Law
b9b0386a3e re PR rtl-optimization/88347 (ICE in begin_move_insn, at sched-ebb.c:175)
PR rtl-optimization/88347
	PR rtl-optimization/88423
	* sched-deps.c (sched_analyze_insn): Take into account that for
	tablejumps the barrier appears after a label and a jump_table_data.

	* gcc.c-torture/compile/pr88347.c: New test.
	* gcc.c-torture/compile/pr88423.c: New test.

From-SVN: r269928
2019-03-25 17:33:36 -06:00
Martin Sebor
0c9992c8b5 PR c/89812 - incorrect maximum in error: requested alignment '536870912' exceeds maximum 2147483648
gcc/c-family/ChangeLog:

	PR c/89812
	* c-common.c (check_user_alignment): Rename local.  Correct maximum
	alignment in diagnostic.  Avoid assuming argument fits in SHWI,
	convert it to UHWI when it fits.

gcc/testsuite/ChangeLog:

	PR c/89812
	* gcc.dg/attr-aligned-3.c: New test.

From-SVN: r269927
2019-03-25 16:56:40 -06:00
Joseph Myers
3f9a660889 Update .po files.
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
	zh_TW.po: Update.

From-SVN: r269926
2019-03-25 21:49:28 +00:00
Johan Karlsson
715e3349b0 re PR debug/86964 (Too many debug symbols included, especially for extern globals)
PR debug/86964
	* dwarf2out.c (premark_used_variables): New function.
	(prune_unused_types_walk): Do not mark not premarked external
	variables.
	(prune_unused_types): Call premark_used_variables.

	* gcc.dg/debug/dwarf2/pr86964.c: New testcase.

From-SVN: r269925
2019-03-25 15:19:09 -06:00
Vladimir Makarov
33163a622d re PR rtl-optimization/89676 (Redundant moves for long long shift on 32bit x86)
2019-03-25  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/89676
	* lra-constraints.c (curr_insn_transform): Do match reload for
	early clobbers when the match was successful only for different
	registers.

From-SVN: r269924
2019-03-25 21:14:40 +00:00
Paolo Carlini
0abbc99c02 re PR c++/84661 (internal compiler error: Segmentation fault (strip_array_types()))
/cp
2019-03-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84661
	PR c++/85013
	* parser.c (cp_parser_binary_expression): Don't call cp_fully_fold
	to undo the disabling of warnings.

/testsuite
2019-03-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84661
	PR c++/85013
	* g++.dg/concepts/pr84661.C: New.
	* g++.dg/torture/pr85013.C: Likewise.

From-SVN: r269923
2019-03-25 20:43:36 +00:00
Jason Merrill
b25e675d7d PR c++/87748 - substitution failure error with decltype.
This issue is similar to PR 87480; in both cases we were doing non-dependent
substitution with processing_template_decl set, leading to member access
expressions seeming still instantiation-dependent, and therefore decltype
not being simplified to its actual type.  And as in that PR, the fix is to
clear processing_template_decl while substituting a default template
argument.

	* pt.c (most_specialized_partial_spec): Clear
	processing_template_decl.

From-SVN: r269921
2019-03-25 14:27:08 -04:00
Martin Sebor
51e471ae61 extend.texi (Common Type Attributes): Document vector_size.
gcc/ChangeLog:
	* doc/extend.texi (Common Type Attributes): Document vector_size.
	(Common Variable Attributes): Mention size constraint.  Correct
	quoting and typos.
	(Vector Extensions): Use @dfn when defining bas type.  Clarify
	base type and size constraints.

From-SVN: r269920
2019-03-25 11:23:31 -06:00
Marek Polacek
bf8c1b11d5 PR c++/89214 - ICE when initializing aggregates with bases.
* typeck2.c (digest_init_r): Warn about object slicing instead of
	crashing.

	* g++.dg/cpp1z/aggr-base8.C: New test.
	* g++.dg/cpp1z/aggr-base9.C: New test.

From-SVN: r269919
2019-03-25 16:38:48 +00:00
Marek Polacek
a55f758221 PR c++/89705 - ICE with reference binding with conversion function.
* call.c (reference_binding): If the result of the conversion function
	is a prvalue of non-class type, use the cv-unqualified type.

	* g++.dg/cpp0x/rv-conv2.C: New test.

From-SVN: r269918
2019-03-25 16:10:06 +00:00
Richard Biener
8d6419db2c re PR tree-optimization/89789 (Compile time hog during RPO VN)
2019-03-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89789
	* tree-ssa-sccvn.c (set_ssa_val_to): Do not allow lattice
	changes from non-undefined back to undefined.

	* gcc.dg/torture/pr89789.c: New testcase.

From-SVN: r269917
2019-03-25 13:53:50 +00:00
Thomas Otto
be5ce04a61 dwarf2out.c (comp_dir_string): cached_wd could be set to both a heap string and a gc string...
2019-03-25  Thomas Otto  <thomas.otto@pdv-fs.de>

	* dwarf2out.c (comp_dir_string): cached_wd could be set to both a
	heap string and a gc string, but since this variable is unknown to
	ggc the gc string might get reused and corrupted. Fixed by always
	using a heap string.

From-SVN: r269916
2019-03-25 13:50:46 +00:00
Nathan Sidwell
d03f6e7bf3 [C++] compiler incompatibility with lambdas
https://gcc.gnu.org/ml/gcc-patches/2019-03/msg00982.html
	* lambda.c (maybe_add_lambda_conv_op): Don't add to comdat group.
	* g++.dg/abi/lambda-static-1.C: New.

From-SVN: r269915
2019-03-25 12:22:47 +00:00
Richard Biener
c0eb90b5db re PR middle-end/89779 (internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in tree_nop_conversion_p, at tree.c:12798)
2019-03-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89779
	* tree-ssa-loop-ivopts.c (remove_unused_ivs): Return
	to remove IV defs, delay actual removal.
	(tree_ssa_iv_optimize_loop): Likewise.  Avoid SCEV reset.
	(tree_ssa_iv_optimize): Remove eliminated IV defs at the
	very end, properly also reset loop control IV information.

From-SVN: r269914
2019-03-25 12:18:38 +00:00
Richard Biener
ecef0d3458 re PR tree-optimization/89802 ([9 Regresssion] ICE: verify_gimple failed (error: dead STMT in EH table))
2019-03-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/89802
	* tree-ssa-math-opts.c (convert_mult_to_fma_1): Properly
	move EH data to folded stmt.

	* g++.dg/tree-ssa/pr89802.C: New testcase.

From-SVN: r269913
2019-03-25 12:15:59 +00:00
Jakub Jelinek
66ec77ce19 re PR c++/60702 (thread_local initialization)
PR c++/60702
	* g++.dg/tls/thread_local11.C: Remove scan-tree-dump-times directives
	for _ZTH* calls.
	* g++.dg/tls/thread_local11a.C: New test.

From-SVN: r269912
2019-03-25 12:53:56 +01:00
John David Anglin
b7ca376ae9 re PR libfortran/79540 (FAIL: gfortran.dg/fmt_fw_d.f90 -O0 execution test)
PR libgfortran/79540
	* io/write_float.def (build_float_string): Don't copy digits when
	ndigits is negative.

From-SVN: r269911
2019-03-25 11:48:36 +00:00
Andreas Krebbel
a260f36938 S/390: Cleanup builtin types file
gcc/ChangeLog:

2019-03-25  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/s390-builtin-types.def: Remove few unused types and
	fix sort order for others.

From-SVN: r269909
2019-03-25 10:10:31 +00:00
Andreas Krebbel
2cd76da88a S/390: Improve debug output for builtin matching
gcc/ChangeLog:

2019-03-25  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/s390-c.c (s390_fn_types_compatible): Print the
	expected and found types with -mdebug during builtin matching.

From-SVN: r269908
2019-03-25 10:09:43 +00:00
Richard Biener
f22e586c69 re PR middle-end/89790 (ICE segfault in operand_equal_p() at fold-const.c:3000 with -Wduplicated-cond since r269838)
2019-03-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/89790
	* fold-const.c (operand_equal_p): Revert last change with
	updated comment.

	* g++.dg/pr89790.C: New testcase.

From-SVN: r269907
2019-03-25 10:05:15 +00:00
Kyrylo Tkachov
4c6d441da1 [doc] Fix typos in MINLOC, MAXLOC documentation
I think there's a typo in the documentation of the MINLOC and MAXLOC intrinsics.
It implies that when the BACK argument is true it returns the first occurrence of the min/max value,
but my understanding is that it should return the last occurrence.

This patch fixes the documentation.

	* intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
	(MAXLOC): Likewise.

From-SVN: r269906
2019-03-25 09:25:07 +00:00
GCC Administrator
af5a5a71b8 Daily bump.
From-SVN: r269905
2019-03-25 00:16:41 +00:00
Segher Boessenkool
06c1602ae4 rs6000: Make CSE'ing __tls_get_addr calls possible
CSE does not consider calls, not even const calls.  This patch puts a
REG_EQUAL note on the pseudo we assign the __tls_get_addr result to,
so that those pseudos can be CSE'd and the extra calls deleted as dead
code.

CSE should really handle const calls directly, but it is stage 4.


	* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Add REG_EQUAL
	notes for the result of the __tls_get_addr calls.
	* config/rs6000/rs6000.md (unspec UNSPEC_TLS_GET_ADDR): New.

From-SVN: r269902
2019-03-24 21:26:53 +01:00
Uros Bizjak
38a47a0fc6 * testsuite/ChangeLog: Fix ChangeLog entry.
From-SVN: r269901
2019-03-24 20:47:03 +01:00
Uros Bizjak
a688356b12 pr82281.c: Compile only for ia32 effective target.
* gcc.target/i386/pr82281.c: Compile only for ia32 effective target.
	(dg-options): Remove -m32. Add -msse2 -mtune=znver1.
	* gcc.target/i386/pr89676.c: Compile only for ia32 effective target.
	(dg-options): Remove -m32 and -march=i686. Add -mno-stv.

From-SVN: r269900
2019-03-24 20:39:59 +01:00
Jeff Law
f8443ff8b1 * config/bfin/bfin.md (movpdi): Fix length for alternative 1.
From-SVN: r269899
2019-03-24 13:25:49 -06:00
Iain Buclaw
70d2d77700 d/dmd: Merge upstream dmd 74ac873be
Introduces a fix for a segfault when building without object.d being
present, as well as MinGW host build errors in dmd/root/filename.c.

Updates a couple of non-portable tests, removing one and fixing the
other.

From-SVN: r269897
2019-03-24 16:20:43 +00:00
Jeff Law
4dd1130557 re PR rtl-optimization/87761 ([MIPS] New FAIL: gcc.target/mips/fix-r4000-10.c -O1 start with r265398)
PR rtl-optimization/87761
	* regcprop.c (copyprop_hardreg_forward_1): Check may_trap_p on SET,
	not INSN.  Also check RTX_FRAME_RELATED_P.  Queue insns for DF rescan
	as needed.
	(pass_cprop_hardreg::execute): Add df note problem and defer insn
	rescans.  Reprocess blocks as needed, calling df_analyze before
	reprocessing.  Always call df_analyze before fixing up debug bind
	insns.

From-SVN: r269896
2019-03-24 09:20:52 -06:00