rs6000_return_addr assumes that the stack link is at frame+0, which is
true for count>0. For count==0, rs6000_return_addr is called with
frame==frame_pointer_rtx and the stack link is *not* at frame+0 if
-fstack-protector-all or -fsanitize=address because rs6000.h sets
FRAME_GROWS_DOWNWARD for those options.
PR target/81996
* gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
stack_pointer_rtx for count 0. Update comments. Break up
large rtl expression.
From-SVN: r253067
As described in PR71951, if libgcc is built with -fomit-frame-pointer,
unwinding crashes, for example while doing a backtrace. The underlying
reason is the Dwarf unwinder does not setup the frame pointer register
in the initialization code. When later unwinding a function that uses
the frame pointer, it tries to read FP using _Unwind_GetGR, and this
crashes if has never restored FP. To unwind correctly the first frame
must save and restore FP (it is unwound in a special way so that it
uses SP instead of FP). This is done by adding -fno-omit-frame-pointer.
gcc/
PR target/71951
* config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
From-SVN: r253063
* testsuite/25_algorithms/clamp/1.cc: Fix order of arguments and
expected results when using predicate defining reverse order.
* testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
From-SVN: r253053
PR libstdc++/79162
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string::_If_sv): Remove from the overload set when the
argument is derived from basic_string.
From-SVN: r253038
PR libstdc++/79162
* include/bits/basic_string.h (basic_string::_If_sv): Remove from the
overload set when the argument is derived from basic_string.
* testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc: New
test.
* testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
New test.
From-SVN: r253025
PR libstdc++/82262
* include/std/optional (__optional_hash_call_base): Add template
parameter for remove_const_t<_Tp> and use it consistently.
* testsuite/20_util/optional/hash.cc: Test optional<const T>.
From-SVN: r253015
PR libstdc++/82254
* include/std/type_traits (__is_invocable): Add partial specialization
for INVOKE<void> case and remove is_void<R> check from partial
specialization for INVOKE<R> case.
(__is_nt_invocable_impl): New helper for is_nothrow_invocable_r.
(is_nothrow_invocable_r): Use __is_nt_invocable_impl.
* testsuite/20_util/is_nothrow_invocable/value.cc: Add tests for
conversions that can throw or fail to convert. Use static assert
strings to explain negative results.
* testsuite/20_util/is_nothrow_invocable/value_ext.cc: Use
is_nothrow_constructible in is_nt_invocable_conv.
From-SVN: r253014
* config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
to processor_model and "amdfam17h" to arch_names_table.
* doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
From-SVN: r252978
2017-09-18 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-09-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/82084
* fold-const.h (can_native_encode_string_p): Declare.
* fold-const.c (can_native_encode_string_p): Factor out from ...
(native_encode_string): ... here.
* tree-vect-stmts.c (vectorizable_store): Call it to avoid
vectorizing stores from constants we later cannot handle.
* g++.dg/torture/pr82084.C: New testcase.
2017-09-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/82108
* tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
for gap in the non-permutation SLP case.
* gcc.dg/vect/pr82108.c: New testcase.
From-SVN: r252918
Backported from mainline
2017-09-14 Jakub Jelinek <jakub@redhat.com>
PR target/81325
* cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
if and where to split a bb, except for splitting before debug insn
sequences followed by non-label real insn. Delete debug insns
in between basic blocks.
* g++.dg/cpp0x/pr81325.C: New test.
From-SVN: r252805
Backported from mainline
2017-09-12 Jakub Jelinek <jakub@redhat.com>
PR target/82112
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
on it early, rather than manual conversion late. For
ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
instead of performing manual conversion.
* gcc.target/powerpc/pr82112.c: New test.
* g++.dg/ext/altivec-18.C: New test.
From-SVN: r252804
Backported from mainline
2017-09-12 Jakub Jelinek <jakub@redhat.com>
PR target/82112
* c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
assertion check that in the condition.
(get_atomic_generic_size): Likewise. Before testing if parameter
has pointer type, if it has array type, call for C++
default_conversion to perform array-to-pointer conversion.
* c-c++-common/pr82112.c: New test.
* gcc.dg/pr82112.c: New test.
From-SVN: r252803
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-09-12 Martin Liska <mliska@suse.cz>
PR testsuite/82114
* gcc.dg/gimplefe-14.c (main): Add handling of case 0.
From-SVN: r252789
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-30 Martin Liska <mliska@suse.cz>
PR inline-asm/82001
* ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
Rename to ...
(func_checker::compare_asm_inputs_outputs): ... this function.
(func_checker::compare_gimple_asm): Use the function to compare
also ASM constrains.
* ipa-icf-gimple.h: Rename the function.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-30 Martin Liska <mliska@suse.cz>
PR inline-asm/82001
* gcc.dg/ipa/pr82001.c: New test.
From-SVN: r252788
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-29 Martin Liska <mliska@suse.cz>
PR other/39851
* gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
From-SVN: r252786
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-10 Martin Liska <mliska@suse.cz>
PR c++/81355
* c-attribs.c (handle_target_attribute):
Report warning for an empty string argument of target attribute.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-10 Martin Liska <mliska@suse.cz>
PR c++/81355
* g++.dg/other/pr81355.C: New test.
From-SVN: r252785
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-08 Martin Liska <mliska@suse.cz>
PR tree-opt/81696
* ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
LABEL_DECLs that can be from a different function.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-08-08 Martin Liska <mliska@suse.cz>
PR tree-opt/81696
* gcc.dg/ipa/pr81696.c: New test.
From-SVN: r252784
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-07-19 Martin Liska <mliska@suse.cz>
PR sanitizer/63361
* c-c++-common/ubsan/float-cast-overflow-1.c: Add either
-ffloat-store or -mieee for targets that need it.
From-SVN: r252783
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-28 Martin Liska <mliska@suse.cz>
PR ipa/81128
* ipa-visibility.c (non_local_p): Handle visibility.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-28 Martin Liska <mliska@suse.cz>
PR ipa/81128
* c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
to a function declaration.
2017-09-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2017-06-28 Martin Liska <mliska@suse.cz>
PR ipa/81128
* gcc.target/i386/pr81128.c: New test.
From-SVN: r252782
[gcc]
2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81833
* config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
define_insn to a define_expand.
(altivec_vsum2sws_direct): New define_insn.
(altivec_vsumsws): Convert from a define_insn to a define_expand.
[gcc/testsuite]
2017-09-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81833
* gcc.target/powerpc/pr81833-1.c: New file.
* gcc.target/powerpc/pr81833-2.c: New file.
From-SVN: r252042