Commit Graph

168156 Commits

Author SHA1 Message Date
GCC Administrator
fc2749e5fd Daily bump.
From-SVN: r270763
2019-05-01 00:16:14 +00:00
Jonathan Wakely
4f75543dc4 PR libstdc++/61761 fix std::proj for targets without C99 cproj
The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.

When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.

We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.

	PR libstdc++/61761
	* include/std/complex (__complex_proj): Return parameter unchanged.
	[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
	floating-point types to take std::complex arguments.
	[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
	floating-point types.
	* testsuite/26_numerics/complex/proj.cc: New test.

From-SVN: r270759
2019-05-01 01:08:36 +01:00
Andrew Waterman
4f47539144 RISC-V: Short-forward-branch opt for SiFive 7 series cores.
gcc/
	* config/riscv/constraints.md (L): New.
	* config/riscv/predicates.md (lui_operand): New.
	(sfb_alu_operand): New.
	* config/riscv/riscv-protos.h (riscv_expand_conditional_move): Declare.
	* config/riscv/riscv.c (riscv_expand_conditional_move): New.
	* config/riscv/riscv.h (TARGET_SFB_ALU): New.
	* config/riscv/risc.md (type): Add sfb_alu.
	(branch<mode>): Renamed from branch_order<mode>.  Change predicate for
	operand 3 to reg_or_0_operand.  In output string, change %3 to %z3.
	(branch_zero<mode>): Delete.
	(mov<mode>cc): New.
	(mov<GPR:mode><X:mode>cc): Likewise.
	* config/riscv/sifive-7.md (sifive_7_sfb_alu): New.  Use in bypasses.

From-SVN: r270758
2019-04-30 16:45:36 -07:00
Nathan Sidwell
598f50d789 [GC PATCH] Correct TS marking of _EXPR nodes
https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01266.html
	gcc/
	* tree.h (MARK_TS_EXP): New.

	gcc/c-family/
	* c-common.c (c_common_init_ts): Use MARK_TS_EXP.  Mark SIZEOF_EXPR.

	gcc/cp/
	* cp-objcp-common.c (cp_common_init_ts): Use MARK_TS_EXP for _EXPR
	nodes.  Call c_common_init_ts.

From-SVN: r270711
2019-04-30 20:23:45 +00:00
Joseph Myers
41003284ed * de.po: Update.
From-SVN: r270709
2019-04-30 20:57:37 +01:00
Jakub Jelinek
7248a6309c re PR target/89093 (C++ exception handling clobbers d8 VFP register)
PR target/89093
	* gcc.target/aarch64/return_address_sign_3.c: Remove extra space in
	target attribute.

From-SVN: r270705
2019-04-30 18:30:44 +02:00
Roland Illig
aaae53ce02 * check-internal-format-escaping.py: New version using polib.
From-SVN: r270704
2019-04-30 10:14:40 -06:00
Giuliano Belinassi
7df9425167 sinhatanh-2.c: Count the number of functions.
* gcc.dg/sinhatanh-2.c: Count the number of functions.
	* gcc.dg/sinhatanh-3.c: Likewise.

From-SVN: r270703
2019-04-30 09:06:31 -06:00
Ben L
6c8dbbfe5c d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
* d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
     * testsuite/d-demangle-expected: Add testcase.

From-SVN: r270700
2019-04-30 08:39:14 -06:00
Ben L
f181b8e780 d-demangle.c (dlang_parse_tuple): Correctly handle error result.
* d-demangle.c (dlang_parse_tuple): Correctly handle error result.
     * testsuite/d-demangle-expected: Add testcase.

From-SVN: r270699
2019-04-30 08:37:51 -06:00
Ben L
dba20a5140 d-demangle.c (dlang_parse_structlit): Correctly handle error result.
* d-demangle.c (dlang_parse_structlit): Correctly handle error result.
    * testsuite/d-demangle-expected: Add testcase.

From-SVN: r270698
2019-04-30 08:36:24 -06:00
Ben L
80b1ab1579 d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
    * testsuite/d-demangle-expected: Add testcase.

From-SVN: r270697
2019-04-30 08:34:52 -06:00
Ben L
81adfd10c9 d-demangle.c (dlang_parse_integer): Fix stack underflow.
* d-demangle.c (dlang_parse_integer): Fix stack underflow.
     * testsuite/d-demangle-expected: Add testcase.

From-SVN: r270696
2019-04-30 08:32:38 -06:00
Ben L
80024f3180 cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
* cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
    * testsuite/demangle-expected: Add testcase.

From-SVN: r270695
2019-04-30 08:22:41 -06:00
Ben L
927e42fd52 cp-demangle.c (d_encoding): Guard against NULL return values from d_right (dc).
* cp-demangle.c (d_encoding): Guard against NULL return values from
     d_right (dc).
     * testsuite/demangle-expected: Add testcase.

From-SVN: r270694
2019-04-30 08:20:11 -06:00
Martin Liska
5bcc5a3b28 Add option suggestion for -Werror=foo and corresponding pragma.
2019-04-30  Martin Liska  <mliska@suse.cz>

	* opts.c (enable_warning_as_error): Provide hints
	for unknown options.
2019-04-30  Martin Liska  <mliska@suse.cz>

	* c-pragma.c (handle_pragma_diagnostic): Provide hints
	for unknown options.
2019-04-30  Martin Liska  <mliska@suse.cz>

	* gcc.dg/Werror-13.c: Add new tests for it.
	* gcc.dg/pragma-diag-6.c: Likewise.

From-SVN: r270693
2019-04-30 13:50:24 +00:00
Martin Liska
44bf474307 Add missing dash for 2 options in documentation (PR debug/90288).
2019-04-30  Martin Liska  <mliska@suse.cz>

	PR debug/90288
	* doc/invoke.texi: Add missing dash for gas-locview-support
	and gno-as-locview-support.

From-SVN: r270692
2019-04-30 13:31:22 +00:00
Jakub Jelinek
b174ca9bb7 Remove unintended part of r270680 commit.
From-SVN: r270691
2019-04-30 14:11:18 +02:00
Jakub Jelinek
d7b0896b23 re PR target/89093 (C++ exception handling clobbers d8 VFP register)
PR target/89093
	* config/aarch64/aarch64.c (aarch64_process_one_target_attr): Don't skip
	whitespace at the start of target attribute string.

	* gcc.target/aarch64/pr89093.c: New test.
	* gcc.target/aarch64/pr63304_1.c: Remove space from target string.

From-SVN: r270690
2019-04-30 14:07:27 +02:00
Jakub Jelinek
9e3501f765 gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports to _Lock_policyE[012].
* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
	to _Lock_policyE[012].
	* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r270687
2019-04-30 13:40:28 +02:00
Ramana Radhakrishnan
abb3c64e76 [Patch AArch64] Add __ARM_FEATURE_ATOMICS
This keeps coming up repeatedly and the ACLE has finally added
__ARM_FEATURE_ATOMICS for the LSE feature in GCC. This is now part of
the latest ACLE release
(https://developer.arm.com/docs/101028/latest/5-feature-test-macros)

I know it's late for GCC-9 but this is a simple macro which need not
wait  for another year.

Ok for trunk and to backport to all release branches ?

Tested with a simple build and a smoke test.

PR target/86538
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_ATOMICS

From-SVN: r270686
2019-04-30 11:22:11 +00:00
Jonathan Wakely
95767c6597 Fix filesystem::path tests
The root_path.cc test had some debugging macros left in accidentally, so
didn't FAIL correctly if an assertion failed.

The string-char8_t.cc tests didn't compile on Windows.

	* testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
	macros accidentally left in.
	* testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
	unnecessary -lstdc++fs option. Fix test for mingw.
	* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
	Fix test for mingw.

From-SVN: r270685
2019-04-30 11:39:59 +01:00
Martin Liska
0d67a51060 Refactor gimple_fold_builtin_memory_op function.
2019-04-30  Martin Liska  <mliska@suse.cz>

	* gimple-fold.c (gimple_fold_builtin_memory_op): Change endp
	into built_in_function enum. Remove code for endp == 2 and
	use BUILT_IN_* constants.
	(gimple_fold_builtin): Call the function with fcode.

From-SVN: r270682
2019-04-30 09:19:41 +00:00
Martin Liska
791536baad Fix -Wenum-compare-switch warning in i386.c.
2019-04-30  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.c (ix86_builtin_reciprocal): Cast
	DECL_FUNCTION_CODE into ix86_builtins enum before
	the switch statement.

From-SVN: r270681
2019-04-30 09:16:36 +00:00
Jakub Jelinek
ae8f39886b re PR tree-optimization/89475 (Teach ccp about __builtin_bswap{16,32,64})
PR tree-optimization/89475
	* tree-ssa-ccp.c (evaluate_stmt): Handle BUILT_IN_BSWAP{16,32,64}
	calls.

	* gcc.dg/tree-ssa/pr89475.c: New test.

From-SVN: r270680
2019-04-30 11:07:28 +02:00
Jakub Jelinek
379637d5e2 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r270678
2019-04-30 10:55:12 +02:00
Martin Liska
3f58b66d6b Wrap a string with _ for translation (PR translation/90274).
2019-04-30  Martin Liska  <mliska@suse.cz>

	PR translation/90274
	* opts.c (print_filtered_help): Wrap string in _(...).

From-SVN: r270675
2019-04-30 08:33:29 +00:00
Bin Cheng
8c3ce59e2b re PR tree-optimization/90240 (ICE in try_improve_iv_set, at tree-ssa-loop-ivopts.c:6694)
PR tree-optimization/90240
	Revert:
	2019-04-23  Bin Cheng  <bin.cheng@linux.alibaba.com>

	PR tree-optimization/90078
	* tree-ssa-loop-ivopts.c (comp_cost::operator +,-,+=,-+,/=,*=): Add
	checks for infinite_cost overflow.

	* gcc/testsuite/g++.dg/tree-ssa/pr90078.C: New test.

From-SVN: r270673
2019-04-30 03:00:59 +00:00
GCC Administrator
0c0b2104b4 Daily bump.
From-SVN: r270672
2019-04-30 00:16:15 +00:00
Joseph Myers
63b805aba9 * sv.po: Update.
From-SVN: r270667
2019-04-29 23:45:23 +01:00
Joseph Myers
4fb7c86dd0 * gcc.pot: Regenerate.
From-SVN: r270665
2019-04-29 23:27:52 +01:00
Ben L
956bea2cd6 cp-demangle.c (d_expression_1): Don't peek ahead unless the current char is valid.
* cp-demangle.c (d_expression_1): Don't peek ahead unless the current
	char is valid.
	* testsuite/demangle-expected: Add testcase.

From-SVN: r270664
2019-04-29 16:19:01 -06:00
Jeff Law
7fb1d0214e * passes.def: Move -Wrestrict pass after copy propagation.
From-SVN: r270662
2019-04-29 14:21:57 -06:00
Maya Rashish
856f73d137 config.gcc (default_gnu_indirect_function): Default to yes for arm*-*-netbsd*...
* config.gcc (default_gnu_indirect_function): Default to yes
	for arm*-*-netbsd*, i[34567]86-*-netbsd*, powerpc*-*-netbsd*,
	sparc*-*-netbsd*, x86_64-*-netbsd*

From-SVN: r270661
2019-04-29 13:48:52 -06:00
Vladislav Ivanishin
5c1b3334a2 tree-ssa-uninit.c (is_pred_expr_subset_of): Correctly handle cases where cond2 is NE_EXPR.
* tree-ssa-uninit.c (is_pred_expr_subset_of): Correctly handle cases
	where cond2 is NE_EXPR.
	(is_value_included_in): Update comment.

        * gcc.dg/uninit-25-gimple.c: New test.
        * gcc.dg/uninit-25.c: New test.
        * gcc.dg/uninit-26.c: New test.
        * gcc.dg/uninit-27-gimple.c: New test.

From-SVN: r270660
2019-04-29 13:47:17 -06:00
Michael K. Darling
95c33590c8 gnatvsn.ads: Bump Library_Version to 10.
2019-04-29  Michael K. Darling  <darlingm@gmail.com>

        * gnatvsn.ads: Bump Library_Version to 10.

From-SVN: r270659
2019-04-29 13:31:24 -06:00
Ian Lance Taylor
65937ccf0b compiler: avoid crash on real declaration of type with existing method
This avoids a compiler crash on invalid code.
    
    Fixes https://gcc.gnu.org/PR90272
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/174377

From-SVN: r270658
2019-04-29 18:56:24 +00:00
Richard Biener
1978e62d47 re PR tree-optimization/90278 (ICE: verify_gimple failed (error: statement marked for throw, but doesn't))
2019-04-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90278
	* tree-ssa-forwprop.c (pass_forwprop::execute): Transfer/clean
	EH on comparison simplification.

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

From-SVN: r270657
2019-04-29 17:53:36 +00:00
Jason Merrill
d407e7f53b PR c++/82081 - tail call optimization breaks noexcept
If a noexcept function calls a function that might throw, doing the tail
call optimization means that an exception thrown in the called function
will propagate out, breaking the noexcept specification.  So we need to
prevent the optimization in that case.

	* tree-tailcall.c (find_tail_calls): Don't turn a call from a
	nothrow function to a might-throw function into a tail call.

From-SVN: r270656
2019-04-29 13:27:13 -04:00
Nathan Sidwell
348dd384c8 [C++ PATCH] some cleanups
https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01174.html
	* decl.c (duplicate_decls): Add whitespace, move comments into
	conditional blocks.
	* method.c (explain_implicit_non_constexpr): Refactor.
	* pt.c (check_explicit_specialization): Fix indentation.
	* semantics.c (process_outer_var_ref): Reformat.
	(finish_id_expression_1): Use STRIP_TEMPLATE.

From-SVN: r270655
2019-04-29 15:22:41 +00:00
Richard Sandiford
074084767c Remove DDR_INNER_LOOP
...since it was only ever zero in practice.  I wondered about making
it a symbolic constant instead, but it didn't seem worth it when
there was only one user (and that user was part of the internal
tree-data-ref.c implementation).

2019-04-29  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-data-ref.h (data_dependence_relation::inner_loop): Delete.
	(DDR_INNER_LOOP): Likewise.
	* tree-data-ref.c (dump_data_dependence_relation): Update accordingly.
	(initialize_data_dependence_relation): Likewise.
	(insert_innermost_unit_dist_vector): Use 0 instead of DDR_INNER_LOOP.

From-SVN: r270654
2019-04-29 15:17:01 +00:00
Jakub Jelinek
1008df90cc re PR rtl-optimization/90257 (8% degradation on cpu2006 403.gcc starting with r270484)
PR rtl-optimization/90257
	* cfgrtl.c (flow_active_insn_p): Return true for USE of a function
	return value.

	Revert the revert:
	2019-04-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/90178
	Revert:
	2018-11-21  Uros Bizjak  <ubizjak@gmail.com>

	Revert the revert:
	2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>

	Revert:
	2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>

	* lra-spills.c (lra_final_code_change): Remove useless move insns.

From-SVN: r270653
2019-04-29 16:18:55 +02:00
Richard Biener
4e29671cb2 tree-ssa.c (insert_debug_temp_for_var_def): For {CLOBBER} rhs issue a reset.
2019-04-29  Richard Biener  <rguenther@suse.de>

	* tree-ssa.c (insert_debug_temp_for_var_def): For {CLOBBER}
	rhs issue a reset.

From-SVN: r270652
2019-04-29 13:54:58 +00:00
Jonathan Wakely
f373ad68cf Adjust doxygen comment for std::generate_n
* include/bits/stl_algo.h (generate_n): Adjust doxygen comment.

From-SVN: r270651
2019-04-29 14:31:50 +01:00
Jonathan Wakely
81912fb385 Use _GLIBCXX_NOEXCEPT_IF for std::swap
* include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
	_GLIBCXX_NOEXCEPT_IF to simplify declarations.

From-SVN: r270650
2019-04-29 14:25:38 +01:00
Jonathan Wakely
7bbdd8d13e PR libstdc++/71312 Increase alignment of pooled mutexes
PR libstdc++/71312
	* src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.

From-SVN: r270649
2019-04-29 13:55:29 +01:00
Jonathan Wakely
ad1f468736 Add nodiscard to std::vector<bool>::empty()
We already added it to the std::vector primary template.

	* include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
	attribute.

From-SVN: r270648
2019-04-29 13:35:24 +01:00
Jonathan Wakely
82b6276fb3 Remove unused std::_Iter_base class template
This class template has been unused since __gnu_debug::__base was
removed in r263786.

	* include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
	class template and partial specialization.

From-SVN: r270647
2019-04-29 13:12:46 +01:00
Jonathan Wakely
846541dd15 PR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter
The standard only requires that _Size can be converted to an integral
type, not that it can be used for arithmetic. Add a new set of
__size_to_integer helper functions to do the conversion (which will be
ambiguous if there is no one conversion that is better than any others).

Also add tests for DR 426 which requires these algorithms and search_n
to handle negative values of n.

	PR libstdc++/87982
	* include/bits/stl_algo.h (generate_n): Convert _Size parameter to
	an integral type.
	* include/bits/stl_algobase.h (__size_to_integer): New overloaded
	functions to convert a value to an integral type.
	(__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
	(fill_n): Convert _Size parameter to an integral type.
	* testsuite/25_algorithms/fill_n/dr426.cc: New test.
	* testsuite/25_algorithms/generate_n/87982.cc: New test.
	* testsuite/25_algorithms/generate_n/dr426.cc: New test.

From-SVN: r270646
2019-04-29 13:12:43 +01:00
Iain Buclaw
ca0ddb398f libphobos: Fix multilib builds for s390x-linux-gnu
Merges upstream druntime aab44549, phobos 3dc363783.

Reviewed-on: https://github.com/dlang/druntime/pull/2590
	     https://github.com/dlang/phobos/pull/6983

libphobos/ChangeLog:

2019-04-28  Iain Buclaw  <ibuclaw@gdcproject.org>

	* libdruntime/gcc/sections/elf_shared.d (IBMZ_Any): Define when
	version S390 or SystemZ.  Use condition instead of SystemZ.
	(getTLSRange): Return null on GNU_EMUTLS targets.

From-SVN: r270639
2019-04-29 05:42:48 +00:00