Since size of "void *" is 4 bytes for x32, check if __x86_64__ is defined
by $CC, instead of
if test x$ac_cv_sizeof_void_p = x8; then
to decide wether sanitizer_linux_x86_64.lo should be used.
Backported from mainline
PR sanitizer/82379
* configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Set
to sanitizer_linux_x86_64.lo if __x86_64__ is defined by $CC.
From-SVN: r253442
2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/80118
* expr.c (gfc_get_full_arrayspec_from_expr): If there is
no symtree, set array spec to NULL.
2017-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
Backport from trunk
PR fortran/80118
* gfortran.dg/zero_sized_7.f90: New test.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r253383
[gcc]
2017-10-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/82337
* gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
phi definition if the PHI result appears in an abnormal PHI.
(find_basis_for_base_expr): Don't record a basis if the LHS of the
basis appears in an abnormal PHI.
[gcc]
2017-10-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-09-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/82337
* gcc.c-torture/compile/pr82337.c: New file.
From-SVN: r253359
Backported from mainline
2017-09-29 Jakub Jelinek <jakub@redhat.com>
PR c/82340
* c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
instead of trying to set just TREE_READONLY manually.
* gcc.dg/tree-ssa/pr82340.c: New test.
From-SVN: r253319
Backported from mainline
2017-09-27 Jakub Jelinek <jakub@redhat.com>
PR c++/82159
* gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
lhs from calls if the lhs has addressable type.
* g++.dg/opt/pr82159.C: New test.
From-SVN: r253318
2017-09-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/82244
* tree-vrp.c (remove_range_assertions): Do not propagate
a constant to abnormals but replace the assert with a copy.
* gcc.dg/torture/pr82244.c: New testcase.
2017-09-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/82276
PR tree-optimization/82244
* tree-vrp.c (build_assert_expr_for): Set
SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
has it set.
(remove_range_assertions): Revert earlier change.
* gcc.dg/torture/pr82276.c: New testcase.
2017-09-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/82264
* tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
for GIMPLE_CONDs.
(vn_phi_lookup): Likewise.
(vn_phi_insert): Likewise.
* is-a.h (safe_dyn_cast): New.
* gcc.dg/torture/pr82264.c: New testcase.
2017-09-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/82285
* tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
enumeral types.
* gcc.dg/torture/pr82285.c: New testcase.
2017-09-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/82291
* tree-if-conv.c (predicate_mem_writes): Make sure to
remove writes in blocks predicated with false.
* gcc.dg/torture/pr82291.c: New testcase.
From-SVN: r253190
PR sanitizer/81929
* tree.c (struct replace_placeholders_t): Add pset field.
(replace_placeholders_r): Call cp_walk_tree with d->pset as
last argument instead of NULL. Formatting fix.
(replace_placeholders): Add pset variable, add its address
into data. Pass &pset instead of NULL to cp_walk_tree.
* g++.dg/ubsan/pr81929.C: New test.
From-SVN: r253108
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