Backport from mainline
2017-08-09 Jonathan Wakely <jwakely@redhat.com>
* include/std/type_traits (_GLIBCXX_NO_BUILTIN_HAS_UNIQ_OBJ_REP):
Replace with _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP and use
__is_identifier to set it.
From-SVN: r251656
2017-08-31 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline
2017-08-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/81504
* config/rs6000/rs6000.c (find_alignment_op): Add reference
parameter and_insn and return it.
(recombine_lvx_pattern): Insert a copy to ensure availability of
the base register of the copied masking operation at the point of
the instruction replacement.
(recombine_stvx_pattern): Likewise.
From-SVN: r251575
2017-08-29 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2017-08-07 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81593
* gcc.target/powerpc/vsx-extract-6.c: New tests for optimzing
vector inserts from vector extracts.
* gcc.target/powerpc/vsx-extract-7.c: Likewise.
From-SVN: r251446
[gcc]
2017-08-29 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2017-08-07 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81593
* config/rs6000/vsx.md (vsx_concat_<mode>_1): New combiner insns
to recognize inserting into a vector from a double word element
that was extracted from another vector, and eliminate extra
XXPERMDI instructions.
(vsx_concat_<mode>_2): Likewise.
(vsx_concat_<mode>_3): Likewise.
(vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
concat to allow optimizing inserts from previous extracts.
[gcc/testsuite]
2017-08-29 Michael Meissner <meissner@linux.vnet.ibm.com>
Back port from trunk
2017-08-07 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81593
* gcc.target/powerpc/vec-setup.h: New tests to test various
combinations of setting up vectors of 2 double word elements.
* gcc.target/powerpc/vec-setup-long.c: Likewise.
* gcc.target/powerpc/vec-setup-double.c: Likewise.
* gcc.target/powerpc/vec-setup-be-long.c: Likewise.
* gcc.target/powerpc/vec-setup-be-double.c: Likewise.
From-SVN: r251445
These need to match the gnu-user.h definitions to support
--enable-default-pie. Otherwise we end up linking the wrong startup
files when defaulting to PIE.
PR target/81170
PR target/81295
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
match gnu-user.h startfile.
(ENDFILE_LINUX_SPEC): Similarly.
From-SVN: r251403
-static and -pie together behave differently depending on whether GCC is
configured with --enable-default-pie. On x86, "-static -pie" fails to
create executable when --enable-default-pie isn't used, but creates a
static executable when --enable-default-pie is used. This patch makes
-static completely override -pie to create a static executable, regardless
if --enable-default-pie is used to configure GCC.
PR target/81170
PR target/81295
PR driver/81523
* gcc.c (NO_PIE_SPEC): Delete.
(PIE_SPEC): Define as !no-pie/pie. Move static|shared|r
exclusion..
(LINK_PIE_SPEC): ..to here.
(LINK_COMMAND_SPEC): Support -no-pie.
* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
chain of crtbegin*.o selection, update for PIE_SPEC changes and
format.
(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
(ENDFILE_CRTEND_SPEC): Similarly.
From-SVN: r251402
2017-08-29 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/81977
* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
memcpy.
* g++.dg/torture/pr81977.C: New testcase.
2017-08-28 Richard Biener <rguenther@suse.de>
PR debug/81993
* dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
Do nothing for removed DIEs.
From-SVN: r251399
2017-08-28 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-06-14 Richard Biener <rguenther@suse.de>
PR middle-end/81088
* fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
literal constants.
(fold_binary_loc): When associating do not treat pre-existing
TREE_OVERFLOW on literal constants as a reason to allow
TREE_OVERFLOW on associated literal constants.
* c-c++-common/ubsan/pr81088.c: New testcase.
2017-06-13 Richard Biener <rguenther@suse.de>
PR middle-end/81065
* fold-const.c (extract_muldiv_1): Remove bogus distribution
case of C * (x * C2 + C3).
(fold_addr_of_array_ref_difference): Properly fold index difference.
* c-c++-common/ubsan/pr81065.c: New testcase.
2017-06-08 Marek Polacek <polacek@redhat.com>
PR sanitize/80932
* c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.
2017-06-07 Marek Polacek <polacek@redhat.com>
PR sanitizer/80932
* fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
TYPE_OVERFLOW_WRAPS check.
* c-c++-common/ubsan/pr80932.c: New test.
From-SVN: r251381
2017-08-28 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-08-21 Richard Biener <rguenther@suse.de>
PR middle-end/81884
* tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
at struct end conservatively when comparing common bases.
* g++.dg/torture/pr81884.C: New testcase.
2017-05-04 Richard Biener <rguenther@suse.de>
* tree.c (array_at_struct_end_p): Handle arrays at struct
end with flexarrays more conservatively. Refactor and treat
arrays of arrays or aggregates more strict. Fix
VIEW_CONVERT_EXPR handling. Remove allow_compref argument.
* tree.h (array_at_struct_end_p): Adjust prototype.
* gimple-fold.c (get_range_strlen): Likewise.
* tree-chkp.c (chkp_may_narrow_to_field): Likewise.
From-SVN: r251379
2017-08-28 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-08-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/81181
* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
(compute_antic): ... end of iteration here.
* gcc.dg/torture/pr81181.c: New testcase.
2017-08-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/81723
* tree-vect-slp.c (struct bst_traits): New hash traits.
(bst_fail): New global.
(vect_build_slp_tree_2): New worker, split out from ...
(vect_build_slp_tree): ... this now wrapping it with using
bst_fail set to cache SLP tree build fails. Properly handle
max_tree_size.
(vect_analyze_slp_instance): Allocate and free bst_fail.
* gfortran.dg/pr81723.f: New testcase.
2017-08-24 Richard Biener <rguenther@suse.de>
PR target/81921
* config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
and ipa-inline.h.
(ix86_can_inline_p): When ix86_fpmath flags do not match
check whether the callee uses FP math at all.
* gcc/testsuite/gcc.target/i386/pr81921.c: New testcase.
From-SVN: r251376
PR c++/81607
* cp-gimplify.c (cp_fold): If folding exposed a branch of
a COND_EXPR, convert it to the original type of the COND_EXPR, if
they differ.
From-SVN: r251358
Backport from mainline
2017-08-23 Daniel Santos <daniel.santos@pobox.com>
* lib/target-supports.exp (check_avx2_hw_available):
Fix breakage due NULL being undefined.
From-SVN: r251336
gcc/
Backport from mainline
2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
PR target/72804
* config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
operands residing in integer registers.
(*vsx_le_perm_load_<mode>): Likewise.
(*vsx_le_perm_store_<mode>): Likewise.
(define_peephole2): Add peepholes to optimize the above.
gcc/testsuite/
Backport from mainline
2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
PR target/72804
* gcc.target/powerpc/pr72804.c: New test.
From-SVN: r251318
2017-08-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/81296
* trans-io.c (get_dtio_proc): Add check for format label and set
formatted flag accordingly. Reorganize the code a little.
* gfortran.dg/dtio_12.f90: Update test.
From-SVN: r251301
gcc/
Backport from mainline
2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
PR target/80210
* config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
(rs6000_set_current_function): Rewrite function to use it.
gcc/testsuite/
Backport from mainline
2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
PR target/80210
* gcc.target/powerpc/pr80210.c: New test.
From-SVN: r251293
2017-08-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/80164
* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
as warning/error locus.
* gfortran.dg/array_temporaries_4.f90: New test.
From-SVN: r251189