Andrew Waterman [Wed, 1 May 2019 04:45:34 +0000 (21:45 -0700)]
RISC-V: Update last ChangeLog entry to mention Andrew Waterman.
From-SVN: r270764
GCC Administrator [Wed, 1 May 2019 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270763
Jonathan Wakely [Wed, 1 May 2019 00:08:36 +0000 (01:08 +0100)]
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
Andrew Waterman [Tue, 30 Apr 2019 23:45:36 +0000 (16:45 -0700)]
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
Nathan Sidwell [Tue, 30 Apr 2019 20:23:45 +0000 (20:23 +0000)]
[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
Joseph Myers [Tue, 30 Apr 2019 19:57:37 +0000 (20:57 +0100)]
* de.po: Update.
From-SVN: r270709
Jakub Jelinek [Tue, 30 Apr 2019 16:30:44 +0000 (18:30 +0200)]
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
Roland Illig [Tue, 30 Apr 2019 16:14:40 +0000 (16:14 +0000)]
* check-internal-format-escaping.py: New version using polib.
From-SVN: r270704
Giuliano Belinassi [Tue, 30 Apr 2019 15:06:31 +0000 (15:06 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:39:14 +0000 (14:39 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:37:51 +0000 (14:37 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:36:24 +0000 (14:36 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:34:52 +0000 (14:34 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:32:38 +0000 (14:32 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:22:41 +0000 (14:22 +0000)]
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
Ben L [Tue, 30 Apr 2019 14:20:11 +0000 (14:20 +0000)]
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
Martin Liska [Tue, 30 Apr 2019 13:50:24 +0000 (15:50 +0200)]
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
Martin Liska [Tue, 30 Apr 2019 13:31:22 +0000 (15:31 +0200)]
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
Jakub Jelinek [Tue, 30 Apr 2019 12:11:18 +0000 (14:11 +0200)]
Remove unintended part of r270680 commit.
From-SVN: r270691
Jakub Jelinek [Tue, 30 Apr 2019 12:07:27 +0000 (14:07 +0200)]
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
Jakub Jelinek [Tue, 30 Apr 2019 11:40:28 +0000 (13:40 +0200)]
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
Ramana Radhakrishnan [Tue, 30 Apr 2019 11:22:11 +0000 (11:22 +0000)]
[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
Jonathan Wakely [Tue, 30 Apr 2019 10:39:59 +0000 (11:39 +0100)]
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
Martin Liska [Tue, 30 Apr 2019 09:19:41 +0000 (11:19 +0200)]
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
Martin Liska [Tue, 30 Apr 2019 09:16:36 +0000 (11:16 +0200)]
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
Jakub Jelinek [Tue, 30 Apr 2019 09:07:28 +0000 (11:07 +0200)]
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
Jakub Jelinek [Tue, 30 Apr 2019 08:55:12 +0000 (10:55 +0200)]
* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r270678
Martin Liska [Tue, 30 Apr 2019 08:33:29 +0000 (10:33 +0200)]
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
Bin Cheng [Tue, 30 Apr 2019 03:00:59 +0000 (03:00 +0000)]
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
GCC Administrator [Tue, 30 Apr 2019 00:16:15 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270672
Joseph Myers [Mon, 29 Apr 2019 22:45:23 +0000 (23:45 +0100)]
* sv.po: Update.
From-SVN: r270667
Joseph Myers [Mon, 29 Apr 2019 22:27:52 +0000 (23:27 +0100)]
* gcc.pot: Regenerate.
From-SVN: r270665
Ben L [Mon, 29 Apr 2019 22:19:01 +0000 (22:19 +0000)]
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
Jeff Law [Mon, 29 Apr 2019 20:21:57 +0000 (14:21 -0600)]
* passes.def: Move -Wrestrict pass after copy propagation.
From-SVN: r270662
Maya Rashish [Mon, 29 Apr 2019 19:48:52 +0000 (19:48 +0000)]
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
Vladislav Ivanishin [Mon, 29 Apr 2019 19:47:17 +0000 (19:47 +0000)]
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
Michael K. Darling [Mon, 29 Apr 2019 19:31:24 +0000 (19:31 +0000)]
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
Ian Lance Taylor [Mon, 29 Apr 2019 18:56:24 +0000 (18:56 +0000)]
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
Richard Biener [Mon, 29 Apr 2019 17:53:36 +0000 (17:53 +0000)]
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
Jason Merrill [Mon, 29 Apr 2019 17:27:13 +0000 (13:27 -0400)]
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
Nathan Sidwell [Mon, 29 Apr 2019 15:22:41 +0000 (15:22 +0000)]
[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
Richard Sandiford [Mon, 29 Apr 2019 15:17:01 +0000 (15:17 +0000)]
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
Jakub Jelinek [Mon, 29 Apr 2019 14:18:55 +0000 (16:18 +0200)]
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
Richard Biener [Mon, 29 Apr 2019 13:54:58 +0000 (13:54 +0000)]
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
Jonathan Wakely [Mon, 29 Apr 2019 13:31:50 +0000 (14:31 +0100)]
Adjust doxygen comment for std::generate_n
* include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
From-SVN: r270651
Jonathan Wakely [Mon, 29 Apr 2019 13:25:38 +0000 (14:25 +0100)]
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
Jonathan Wakely [Mon, 29 Apr 2019 12:55:29 +0000 (13:55 +0100)]
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
Jonathan Wakely [Mon, 29 Apr 2019 12:35:24 +0000 (13:35 +0100)]
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
Jonathan Wakely [Mon, 29 Apr 2019 12:12:46 +0000 (13:12 +0100)]
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
Jonathan Wakely [Mon, 29 Apr 2019 12:12:43 +0000 (13:12 +0100)]
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
Iain Buclaw [Mon, 29 Apr 2019 05:42:48 +0000 (05:42 +0000)]
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
Iain Buclaw [Mon, 29 Apr 2019 05:42:36 +0000 (05:42 +0000)]
libphobos: Backport minimal MinGW support patches.
Merges upstream druntime
1ca80e4e, phobos
b5e9661a0.
Reviewed-on: https://github.com/dlang/druntime/pull/2587
https://github.com/dlang/phobos/pull/6981
From-SVN: r270638
GCC Administrator [Mon, 29 Apr 2019 00:16:17 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270637
Jonathan Wakely [Sun, 28 Apr 2019 21:38:19 +0000 (22:38 +0100)]
Fix ChangeLog format
From-SVN: r270633
Nina Dinka Ranns [Sun, 28 Apr 2019 21:17:50 +0000 (21:17 +0000)]
Adding noexcept-specification on tuple constructors (LWG 2899)
2019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
* libstdc++-v3/include/std/tuple:
(tuple()): Add noexcept-specification.
(tuple(const _Elements&...)): Likewise
(tuple(_UElements&&...)): Likewise
(tuple(const tuple<_UElements...>&)): Likewise
(tuple(tuple<_UElements...>&&)): Likewise
(tuple(const _T1&, const _T2&)): Likewise
(tuple(_U1&&, _U2&&)): Likewise
(tuple(const tuple<_U1, _U2>&): Likewise
(tuple(tuple<_U1, _U2>&&): Likewise
(tuple(const pair<_U1, _U2>&): Likewise
(tuple(pair<_U1, _U2>&&): Likewise
* libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
From-SVN: r270632
GCC Administrator [Sun, 28 Apr 2019 00:16:20 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270630
Jakub Jelinek [Sat, 27 Apr 2019 21:56:17 +0000 (23:56 +0200)]
re PR c++/90173 (ICE: Segmentation fault (in strip_declarator_types))
PR c++/90173
* g++.dg/cpp1z/class-deduction66.C: Use dg-do compile instead of
dg-do run.
From-SVN: r270626
Iain Buclaw [Sat, 27 Apr 2019 16:52:26 +0000 (16:52 +0000)]
[netbsd] d: Fix build failures on sparc*-netbsd
gcc/ChangeLog:
2019-04-27 Iain Buclaw <ibuclaw@gdcproject.org>
* config/netbsd-d.c: Include memmodel.h. Remove unused tree.h,
varasm.h, and netbsd-protos.h.
From-SVN: r270625
Marc Glisse [Sat, 27 Apr 2019 14:09:20 +0000 (16:09 +0200)]
Use __restrict for __relocate_object_a
2019-04-27 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/87106
* include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
arguments with __restrict.
From-SVN: r270624
Uros Bizjak [Sat, 27 Apr 2019 13:38:19 +0000 (15:38 +0200)]
re PR target/89261 (ix86_data_alignment has wrong argument type)
PR target/89261
* config/i386/i386-protos.h (ix86_data_alignment): Change
the second argument type to unsigned int.
* config/i386/i386.c (ix86_data_alignment): Change "align"
argument type to unsigned int.
testsuite/ChangeLog:
PR target/89261
* gcc.target/i386/pr89261.c: New test.
From-SVN: r270623
Martin Liska [Sat, 27 Apr 2019 06:33:29 +0000 (08:33 +0200)]
Add missing target options (PR middle-end/90258).
2019-04-27 Martin Liska <mliska@suse.cz>
PR middle-end/90258
* opt-suggestions.c (option_proposer::build_option_suggestions):
When get_valid_option_values returns empty values, add the
misspelling candidate.
2019-04-27 Martin Liska <mliska@suse.cz>
PR middle-end/90258
* gcc.dg/completion-5.c: New test.
* gcc.target/i386/spellcheck-options-5.c: New test.
From-SVN: r270622
Jim Wilson [Sat, 27 Apr 2019 00:46:20 +0000 (00:46 +0000)]
RISC-V: Promode modes of constant loads for store insns.
This improves optimization of code storing constants to memory. Given this
testcase:
void sub1 (int *a, long long *b) { *a = 1; *b = 1; }
an unpatched rv64 compiler emits two li instructions, one for an SImode pseudo
and one for a DImode pseudo. With the patch, we get a single DImode li insn.
gcc/
* config/riscv/riscv-protos.h (riscv_move_integer): Add machine_mode
parameter.
* config/riscv/riscv.c (riscv_move_integer): New parameter orig_mode.
Pass orig_mode to riscv_build_integer.
(riscv_split_integer): Pass mode to riscv_move_integer.
(riscv_legitimize_const_move): Likewise.
(riscv_legitimize_move): For MEM dest and CONST_INT src case, new local
promoted_mode. Replace force_reg call with code to load constant into
promoted reg and then subreg it for the store.
* config/riscv/riscv.md (low<mode>+1): Pass <GPR:MODE>mode to
riscv_move_integer.
gcc/testsuite/
* gcc.target/riscv/load-immediate.c: New.
From-SVN: r270621
GCC Administrator [Sat, 27 Apr 2019 00:16:32 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270620
Ian Lance Taylor [Fri, 26 Apr 2019 17:20:55 +0000 (17:20 +0000)]
runtime: fix TestPhysPageSize on AIX
AIX doesn't allow to mmap an address range which is already mmap.
Therefore, once the region has been allocated, it must munmap before
being able to play with it.
The corresponding Go Toolchain patch is CL 174059.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/174138
From-SVN: r270615
H.J. Lu [Fri, 26 Apr 2019 16:53:54 +0000 (16:53 +0000)]
x32: Update baseline_symbols.txt
* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
From-SVN: r270613
Jonathan Wakely [Fri, 26 Apr 2019 16:33:02 +0000 (17:33 +0100)]
PR c++/90243 - orphaned note in uninstantiated constexpr function
gcc/cp:
PR c++/90243 - orphaned note in uninstantiated constexpr function
* decl.c (check_for_uninitialized_const_var): Suppress notes if no
error was shown.
gcc/testsuite:
PR c++/90243
* g++.dg/diagnostic/pr90243.C: New test.
From-SVN: r270610
Jonathan Wakely [Fri, 26 Apr 2019 15:58:47 +0000 (16:58 +0100)]
Remove redundant step in experimental::filesystem::path construction
* include/experimental/bits/fs_path.h
(path::_S_convert_loc<_InputIterator>): Create const std::string to
avoid redundant call to _S_convert_loc with non-const pointers.
From-SVN: r270608
Eugene Sharygin [Fri, 26 Apr 2019 15:48:43 +0000 (15:48 +0000)]
gdbhooks.py: Fix UnicodeDecodeErrors when printing trees with corrupt codes.
* gdbhooks.py: Fix UnicodeDecodeErrors when printing trees with
corrupt codes.
From-SVN: r270607
Jakub Jelinek [Fri, 26 Apr 2019 15:38:33 +0000 (17:38 +0200)]
re PR debug/90197 (Cannot step through simple loop at -O -g)
PR debug/90197
* c-tree.h (c_finish_loop): Add 2 further location_t arguments.
* c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
(c_parser_do_statement): Likewise.
(c_parser_for_statement): Likewise. Formatting fixes.
* c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
emit DEBUG_BEGIN_STMTs if needed.
From-SVN: r270606
Michael Forney [Fri, 26 Apr 2019 15:35:01 +0000 (15:35 +0000)]
libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF is not defined.
* libiberty.h (vasprintf): Don't declare if HAVE_DECL_VASPRINTF
is not defined.
From-SVN: r270605
Jonathan Wakely [Fri, 26 Apr 2019 15:02:02 +0000 (16:02 +0100)]
Fix tests that fail with _GLIBCXX_USE_CXX11_ABI=0
The pmr::string typedef isn't available for the old COW string, so some
tests that use it were failing.
* testsuite/20_util/variant/run.cc: Use a new Hashable type to test
hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
* testsuite/21_strings/basic_string/hash/hash.cc
[!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
* testsuite/21_strings/basic_string/hash/hash_char8_t.cc
[!_GLIBCXX_USE_CXX11_ABI]: Likewise.
From-SVN: r270604
Paolo Carlini [Fri, 26 Apr 2019 14:51:00 +0000 (14:51 +0000)]
re PR c++/90173 (ICE: Segmentation fault (in strip_declarator_types))
/cp
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
* decl.c (grokdeclarator): Set type to error_mark_node
upon error about template placeholder type non followed
by a simple declarator-id.
/testsuite
2019-04-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/90173
* g++.dg/cpp1z/class-deduction66.C: New.
From-SVN: r270603
Jonathan Wakely [Fri, 26 Apr 2019 14:04:45 +0000 (15:04 +0100)]
Reduce code instantiated by filesystem::path::_S_convert_loc
Jakub noted in https://gcc.gnu.org/ml/libstdc++/2019-04/msg00140.html
that an unwanted std::wstring::_M_replace_dispatch symbol has started to
be exported from the Fedora shared library. This symbol is triggered by
the instantiation of std::wstring::assign(const char*, const char*) from
std::__str_codecvt_in which is called from path::_S_convert_loc. The
branch that triggers that instantiation can't actually happen in that
case, because codecvt facets will only return noconv when the input and
output types are the same. Guarding the assign call with an if-constexpr
check that the types are the same avoids instantiating template
specializations that will never actually be needed.
* config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
wstring::_M_replace_dispatch with more specific patterns.
* include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
Create const std::string to avoid redundant call to _S_convert_loc
with non-const pointers.
* include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
avoid unnecessary basic_string::assign instantiations.
From-SVN: r270602
Jonathan Wakely [Fri, 26 Apr 2019 13:15:54 +0000 (14:15 +0100)]
Tweak C++2a uses-allocator construction utilities
The 20_util/scoped_allocator/69293_neg.cc test was failing in C++2a mode
because the expected static_assert text wasn't matched. The code is
still ill-formed in C++2a, but uses the new __uses_alloc_args function
and so fails a different static_assert. This patch adds the same string
to the new static_assert, so the test passes.
Now that G++ allows concepts to be declared without 'bool' we can use
the correct C++2a syntax for the _Std_pair concept used to constrain the
uses-allocator construction utilities.
Also add a new test to verify that pmr::polymorphic_allocator correctly
performs recursive uses-allocator construction for nested pairs in
C++2a.
* include/std/memory (__uses_alloc_args): Add string-literal to
static_assert, to match the one in __uses_alloc.
[__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
* testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
for recursive uses-allocator construction of nested pairs.
* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
comment.
From-SVN: r270600
Jakub Jelinek [Fri, 26 Apr 2019 12:08:58 +0000 (14:08 +0200)]
baseline_symbols.txt: Update.
* config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
From-SVN: r270598
Paolo Carlini [Fri, 26 Apr 2019 11:46:15 +0000 (11:46 +0000)]
decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location.
/cp
2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
min_location.
/testsuite
2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/trailing1.C: New.
From-SVN: r270597
Jakub Jelinek [Fri, 26 Apr 2019 11:13:04 +0000 (13:13 +0200)]
baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
From-SVN: r270595
Richard Sandiford [Fri, 26 Apr 2019 10:33:10 +0000 (10:33 +0000)]
Fix use of COMPLETE_TYPE_P for -Wstrict-aliasing=1
The handling of -Wstrict-aliasing=1 applied COMPLETE_TYPE_P to the
pointer type rather than the pointer target, so missed the warnings
for "struct incomplete" in the testcase.
I couldn't find any existing C tests for -Wstrict-aliasing=1,
so I added a few extra tests besides the ones fixed by the patch.
I'm sure there's lots more we could test -- this is just supposed
to be better than the status quo (i.e. nothing).
2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
gcc/c-family/
* c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
the pointer target rather than the pointer itself.
gcc/testsuite/
* gcc.dg/alias-16.c: New test.
From-SVN: r270594
Richard Sandiford [Fri, 26 Apr 2019 09:59:31 +0000 (09:59 +0000)]
Add commentary to (SET_)TYPE_VECTOR_SUBPARTS
2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree.h (TYPE_VECTOR_SUBPARTS, SET_TYPE_VECTOR_SUBPARTS): Add
commentary about the encoding of precision.
From-SVN: r270593
GCC Administrator [Fri, 26 Apr 2019 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270592
Jonathan Wakely [Thu, 25 Apr 2019 22:43:15 +0000 (23:43 +0100)]
PR libstdc++/90239 use uses_allocator_construction_args in <scoped_allocator>
PR libstdc++/90239
* doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
* include/std/scoped_allocator [__cplusplus > 201703L]
(scoped_allocator_adaptor::construct): Define in terms of
uses_allocator_construction_args, as per P0591R4.
* testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
* testsuite/util/testsuite_allocator.h: Remove name of unused
parameter.
From-SVN: r270588
Andreas Tobler [Thu, 25 Apr 2019 20:03:35 +0000 (22:03 +0200)]
freebsd64.h: Add bits for 32-bit multilib support.
2019-04-25 Andreas Tobler <andreast@gcc.gnu.org>
* config/i386/freebsd64.h: Add bits for 32-bit multilib support.
* config/i386/t-freebsd64: New file.
* config.gcc: Add the t-freebsd64 for multilib support.
From-SVN: r270586
Uros Bizjak [Thu, 25 Apr 2019 19:45:26 +0000 (21:45 +0200)]
extend.texi (vector_size): Add missing comma after @xref.
* doc/extend.texi (vector_size): Add missing comma after @xref.
From-SVN: r270585
Jakub Jelinek [Thu, 25 Apr 2019 18:01:17 +0000 (20:01 +0200)]
* BASE-VER: Set to 10.0.0.
From-SVN: r270581
Richard Biener [Thu, 25 Apr 2019 17:58:56 +0000 (17:58 +0000)]
re PR middle-end/89765 (Multiple problems with vec-insert implementation on PowerPC)
PR middle-end/89765
* gimplify.c (gimplify_expr): Avoid turning a lvalue
VIEW_CONVERT_EXPR into one operating on an rvalue.
From-SVN: r270579
H.J. Lu [Thu, 25 Apr 2019 17:00:28 +0000 (10:00 -0700)]
x86: Update message for target_clones and unsupported ISAs
Before AVX512F, processors with the newer ISAs also support the older
ISAs, i.e., AVX2 processors also support AVX and SSE4, SSE4 processors
also support SSSE3, ... After AVX512F, an AVX512XX processor may not
support AVX512YY. It means AVX512XX features, except for AVX512F, can't
be used to decide priority in target_clones.
This patch updates error message for ISAs with P_ZERO priority. It also
merges _feature_list into _isa_names_table and marks ISAs, which have
unknown priority, with P_ZERO so that we only need to update one place
to add a new ISA feature.
gcc/
2019-04-25 H.J. Lu <hongjiu.lu@intel.com>
PR target/89929
* config/i386/i386.c (feature_priority): Moved to file scope.
(processor_features): Likewise.
(processor_model): Likewise.
(_arch_names_table): Likewise.
(arch_names_table): Likewise.
(_feature_list): Removed.
(feature_list): Likewise.
(_isa_names_table): Moved to file scope. Add priority.
(isa_names_table): Likewise.
(get_builtin_code_for_version): Replace feature_list with
isa_names_table. Update error message for P_ZERO priority.
gcc/testsuite/
2019-04-25 Martin Liska <mliska@suse.cz>
H.J. Lu <hongjiu.lu@intel.com>
PR target/89929
* g++.target/i386/mv28.C: New test.
* gcc.target/i386/mvc14.c: Likewise.
* g++.target/i386/pr57362.C: Updated.
From-SVN: r270578
Iain Buclaw [Thu, 25 Apr 2019 15:31:35 +0000 (15:31 +0000)]
libphobos: Fix segfault in runtime caused by unexpected GC of TLS data.
libphobos/ChangeLog:
2019-04-25 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/90250
* libdruntime/gcc/sections/elf_shared.d (initTLSRanges): Populate
_tlsRanges in every startup thread.
* testsuite/libphobos.thread/thread.exp: Load libphobos-dg.exp.
* testsuite/libphobos.thread/tlsgc_sections.d: New test.
From-SVN: r270576
Richard Biener [Thu, 25 Apr 2019 14:55:42 +0000 (14:55 +0000)]
tree-pass.h (make_pass_phi_only_cprop): Remove.
2019-04-25 Richard Biener <rguenther@suse.de>
* tree-pass.h (make_pass_phi_only_cprop): Remove.
* timevar.def (TV_TREE_PHI_CPROP): Likewise.
From-SVN: r270575
Jeff Law [Thu, 25 Apr 2019 14:32:16 +0000 (08:32 -0600)]
re PR tree-optimization/90037 (-Wnull-dereference false positive after r269302)
PR tree-optimization/90037
* Makefile.in (OBJS): Remove tree-ssa-phionlycprop.c
* passes.def: Replace all instance of phi-only cprop with the
lattice propagator. Move propagation pass from after erroneous
path isolation to before erroneous path isolation.
* tree-ssa-phionlycprop.c: Remove.
* gcc.dg/tree-ssa/
20030710-1.c: Update dump file to scan.
* gcc.dg/isolate-2.c: Likewise.
* gcc.dg/isolate-4.c: Likewise.
* gcc.dg/pr19431.c: Accept either ordering of PHI args.
* gcc.dg/pr90037.c: New test.
From-SVN: r270574
Rainer Orth [Thu, 25 Apr 2019 12:39:33 +0000 (12:39 +0000)]
Fix typo in m4/druntime/cpu.m4
* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): Quote brackets.
* configure: Regenerate.
From-SVN: r270573
Jakub Jelinek [Thu, 25 Apr 2019 12:18:07 +0000 (14:18 +0200)]
re PR c++/44648 (missing -Wunused warning on a const variable in if statement)
PR c++/44648
* g++.dg/warn/Wunused-var-35.C: Remove xfail.
From-SVN: r270572
Johannes Pfau [Thu, 25 Apr 2019 11:22:27 +0000 (11:22 +0000)]
D: Do not add target_libs if phobos is disabled
From-SVN: r270571
Richard Biener [Thu, 25 Apr 2019 11:17:49 +0000 (11:17 +0000)]
re PR tree-optimization/90213 (UBSAN: signed integer overflow: -
5621332293356458048 * 8 cannot be represented in type 'long int')
2019-04-24 Richard Biener <rguenther@suse.de>
PR middle-end/90213
* gimple-fold.c (fold_const_aggregate_ref_1): Do multiplication
by size and BITS_PER_UNIT on poly-wide-ints.
From-SVN: r270570
Richard Biener [Thu, 25 Apr 2019 11:15:35 +0000 (11:15 +0000)]
re PR middle-end/90194 (ICE in expand_debug_expr, at cfgexpand.c:5244)
2019-04-25 Richard Biener <rguenther@suse.de>
PR middle-end/90194
* match.pd: Add pattern to simplify view-conversion of an
empty constructor.
* g++.dg/torture/pr90194.C: New testcase.
From-SVN: r270569
Johannes Pfau [Thu, 25 Apr 2019 11:11:39 +0000 (11:11 +0000)]
D: Implement GCC emutls in druntime
* libdruntime/Makefile.am: Add emutls and gthread files.
* libdruntime/Makefile.in: Regenerate.
* libdruntime/gcc/emutls.d: New file. Implement GC-compatible emutls.
* libdruntime/gcc/gthread.d: New file.
* libdruntime/gcc/sections/elf_shared.d: Integrate emutls support.
* testsuite/libphobos.allocations/tls_gc_integration.d: New test for
TLS.
From-SVN: r270568
Iain Buclaw [Thu, 25 Apr 2019 06:26:57 +0000 (06:26 +0000)]
libphobos: Add missing PWD_COMMAND to Makefile.
2019-04-25 Iain Buclaw <ibuclaw@gdcproject.org>
* testsuite/Makefile.am: Set PWD_COMMAND.
* testsuite/Makefile.in: Regenerate.
From-SVN: r270566
Ian Lance Taylor [Thu, 25 Apr 2019 01:13:22 +0000 (01:13 +0000)]
compiler: fix glitch when inlining method with empty param/receiver
Fix a problem with Function_declaration::import_function relating to
how no-name or "sink" parameters are handled. In Gogo::start_function
(for the non-inline case) when parameter bindings are being added,
parameters with empty/sink names are renamed to synthesized "r.%d" /
"p.%d" names so as to avoid collisions. This same handling needs to be
present when creating the bindings for an inline function that's being
instantiated after being read from export data.
Fixes golang/go#31637.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/173538
From-SVN: r270564
GCC Administrator [Thu, 25 Apr 2019 00:16:17 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270563
Iain Buclaw [Wed, 24 Apr 2019 22:46:59 +0000 (22:46 +0000)]
libphobos: Fix linker warning and SEGV in core.thread tests.
The monolithic core/threadasm.S source has been removed, and split into
multiple parts, one for each intended target CPU/OS.
Added .type and .size directives for all asm implementations of
fiber_switchContent and callWithStackShell where they were missing.
libphobos/ChangeLog:
2019-04-25 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/90086
* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): New macro.
* configure.ac: Use it.
* configure: Regenerate.
* libdruntime/Makefile.am: Add new config sources to
DRUNTIME_SOURCES_CONFIGURED.
* libdruntime/Makefile.in: Regenerate.
* libdruntime/config/aarch64/switchcontext.S: New file.
* libdruntime/config/arm/switchcontext.S: New file.
* libdruntime/config/common/threadasm.S: New file.
* libdruntime/config/mingw/switchcontext.S: New file.
* libdruntime/config/mips/switchcontext.S: New file.
* libdruntime/config/powerpc/switchcontext.S: New file.
* libdruntime/config/powerpc64/callwithstack.S: New file.
* libdruntime/config/x86/switchcontext.S: New file.
* libdruntime/core/threadasm.S: Remove.
From-SVN: r270560
Jonathan Wakely [Wed, 24 Apr 2019 22:16:45 +0000 (23:16 +0100)]
Update C++17 library status tables
* doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
* doc/html/*: Regenerate.
From-SVN: r270559