Jakub Jelinek [Mon, 25 Jun 2018 16:57:13 +0000 (18:57 +0200)]
backport: re PR target/78643 (ICE in convert_move, at expr.c:230)
Backported from mainline
2017-12-02 Jakub Jelinek <jakub@redhat.com>
PR target/78643
PR target/80583
* expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
is BLKmode for vector field with vector raw mode, use TYPE_MODE
instead of DECL_MODE.
Jakub Jelinek [Mon, 25 Jun 2018 16:53:11 +0000 (18:53 +0200)]
backport: parser.c (cp_parser_omp_declare): Change return type to bool from void, return true for declare simd.
Backported from mainline
2017-11-23 Jakub Jelinek <jakub@redhat.com>
* parser.c (cp_parser_omp_declare): Change return type to bool from
void, return true for declare simd.
(cp_parser_pragma): Return cp_parser_omp_declare returned value
rather than always false.
Jakub Jelinek [Mon, 25 Jun 2018 16:51:38 +0000 (18:51 +0200)]
backport: re PR middle-end/82253 (ICE in convert_move, at expr.c:604)
Backported from mainline
2017-11-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82253
* expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
bitpos/bitsize covering the whole destination, use store_expr only if
the complex mode is the same. Otherwise, use expand_normal and if
it returns CONCAT, subreg each part separately instead of trying to
subreg the whole result.
Jakub Jelinek [Mon, 25 Jun 2018 16:47:39 +0000 (18:47 +0200)]
backport: re PR c++/82781 (Vector extension operators return wrong result in constexpr)
Backported from mainline
2017-11-20 Jakub Jelinek <jakub@redhat.com>
PR c++/82781
* constexpr.c (cxx_eval_vector_conditional_expression): New function.
(cxx_eval_constant_expression) <case VEC_COND_EXPR>: Use it instead
of cxx_eval_conditional_expression.
Jakub Jelinek [Mon, 25 Jun 2018 16:45:10 +0000 (18:45 +0200)]
backport: re PR rtl-optimization/82192 (gcc produces incorrect code with -O2 and bit-field)
Backported from mainline
2017-09-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/82192
* combine.c (make_extraction): Don't look through non-paradoxical
SUBREGs or TRUNCATE if pos + len is or might be bigger than
inner's mode.
2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/85989
* gimple-ssa-backprop.c (backprop::m_visited_phis): New member
variable.
(backprop::backprop): Initialize it.
(backprop::~backprop): Free it.
(backprop::intersect_uses): Check it when deciding whether this
is a backedge reference.
(backprop::process_block): Add each phi to m_visited_phis
after visiting it, then clear it at the end.
gcc/testsuite/
PR tree-optimization/85989
* gcc.dg/torture/pr85989.c: New test.
Richard Biener [Thu, 21 Jun 2018 11:18:50 +0000 (11:18 +0000)]
backport: [multiple changes]
2018-06-21 Richard Biener <rguenther@suse.de>
Backport from mainline
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.
2017-06-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/81410
* tree-vect-stmts.c (vectorizable_load): Properly adjust for
the gap in the ! slp_perm SLP case after each group.
* gcc.dg/vect/pr81410.c: New testcase.
2017-03-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/79920
* tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
with ncopies == 1 to ...
(vect_transform_slp_perm_load): ... here. Properly compute
all element loads by iterating VF times over the group. Do
not handle ncopies (computed in a broken way) in
vect_create_mask_and_perm.
Richard Biener [Thu, 21 Jun 2018 09:50:36 +0000 (09:50 +0000)]
backport: [multiple changes]
2018-06-21 Richard Biener <rguenther@suse.de>
Backport from mainline
2018-02-28 Richard Biener <rguenther@suse.de>
PR middle-end/84607
* genmatch.c (capture_info::walk_match): Do not mark
captured expressions without operands as expr_p given
they act more like predicates and should be subject to
"lost tail" side-effect preserving.
* gcc.dg/pr84607.c: New testcase.
2018-05-04 Richard Biener <rguenther@suse.de>
PR middle-end/85588
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.
* gcc.dg/torture/pr85588.c: New testcase.
* gcc.dg/torture/pr57656.c: Use dg-additional-options.
Richard Biener [Thu, 21 Jun 2018 07:24:06 +0000 (07:24 +0000)]
backport: [multiple changes]
2018-06-21 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.
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85244
* tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
after seeing a component reference with an adjacent field. Treat
refs to arrays at struct end of external decls similar to
refs to unconstrained commons.
* gcc.dg/torture/pr85244-1.c: New testcase.
* gcc.dg/torture/pr85244-2.c: Likewise.
PR c/84873
* c-gimplify.c (c_gimplify_expr): Do not fold expressions.
* c-c++-common/pr84873.c: New testcase.
2018-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.
Backport from mainline
2018-01-01 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83623
* expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
check for bswap in mode rather than HImode and use that in expand_unop
too.
* gcc.dg/pr83623.c: New test.
2017-09-26 Richard Biener <rguenther@suse.de>
Backport from mainline
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-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82402
* tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
* gcc.dg/torture/pr82402.c: New testcase.
2017-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82697
* tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
zero for conditional load and unconditional store.
* gcc.dg/torture/pr82697.c: New testcase.
2017-11-02 Richard Biener <rguenther@suse.de>
PR middle-end/82765
* varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
Truncate ARRAY_REF index and element size.
Max Filippov [Tue, 19 Jun 2018 21:08:46 +0000 (21:08 +0000)]
xtensa: fix PR target/65416
The issue is caused by reordering of stack pointer update after stack
space allocation with instructions that write to the allocated stack
space. In windowed ABI register spill area for the previous call frame
is located just below the stack pointer and may be reloaded back into
the register file on movsp.
Implement allocate_stack pattern for windowed ABI configuration and
insert an instruction that prevents reordering of frame memory access
and stack pointer update.
gcc/
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
Backport from mainline
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
constant.
(allocate_stack, frame_blockage, *frame_blockage): New patterns.
Martin Liska [Fri, 15 Jun 2018 08:51:28 +0000 (10:51 +0200)]
Partial backport r256656
2018-06-15 Martin Liska <mliska@suse.cz>
Backport from mainline
2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
* lex.c (search_line_fast): Remove illegal coercion of an
unaligned pointer value to vector pointer type and replace with
use of __builtin_vec_vsx_ld () built-in function, which operates
on unaligned pointer values.
Eric Botcazou [Sat, 2 Jun 2018 09:58:46 +0000 (09:58 +0000)]
backport: trans.c (Call_to_gnu): If this is a function call and there is no target...
Backport from mainline
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
there is no target, also create a temporary for the return value for
an allocator if the type is an unconstrained record type with default
discriminant.
Bill Schmidt [Fri, 1 Jun 2018 13:00:57 +0000 (13:00 +0000)]
backport: [multiple changes]
2018-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
Backport from mainline:
2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
* gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
first_interp field.
(alloc_cand_and_find_basis): Initialize first_interp field.
(slsr_process_mul): Modify first_interp field.
(slsr_process_add): Likewise.
(slsr_process_cast): Modify first_interp field for each new
interpretation.
(slsr_process_copy): Likewise.
(dump_candidate): Dump first_interp field.
(replace_mult_candidate): Process all interpretations, not just
subsequent ones.
(replace_rhs_if_not_dup): Likewise.
(replace_one_candidate): Likewise.
Backport from mainline:
2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
* gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
this candidate has already been replaced in-situ by a copy.
Paul Thomas [Wed, 16 May 2018 11:42:47 +0000 (11:42 +0000)]
re PR fortran/83149 ([6- and 7-branches] Missing test for sym->ns->proc_name: crash_signal in toplev.c:325)
2018-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
Backport from trunk
* trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
before accessing its components.
* trans-types.c (gfc_sym_type): If a character result has null
backend_decl, try the procedure symbol.
2018-05-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83149
Backport from trunk
* gfortran.dg/pr83149_1.f90: New test.
* gfortran.dg/pr83149.f90: Additional source for previous.
* gfortran.dg/pr83149_b.f90: New test.
* gfortran.dg/pr83149_a.f90: Additional source for previous.
Steven G. Kargl [Fri, 11 May 2018 18:34:14 +0000 (18:34 +0000)]
re PR fortran/85521 (ICE in gfc_resolve_character_array_constructor, at fortran/array.c:2049)
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85521
Backport from trunk
* array.c (gfc_resolve_character_array_constructor): Substrings
with upper bound smaller than lower bound are zero length strings.
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85521
Backport from trunk
* gfortran.dg/pr85521_1.f90: New test.
* gfortran.dg/pr85521_2.f90: New test.
Jonathan Wakely [Thu, 10 May 2018 19:27:14 +0000 (20:27 +0100)]
Document Dual ABI for std::ios_base::failure
* doc/xml/manual/debug_mode.xml: Add array and forward_list to list
of C++11 containers with Debug Mode support.
* doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
* doc/html/*: Regenerate.
re PR fortran/85507 (ICE in gfc_dep_resolver, at fortran/dependency.c:2258)
gcc/fortran/ChangeLog:
2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.
gcc/testsuite/ChangeLog:
2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/85507
Backport from trunk.
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.