]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
7 years agobackport: re PR fortran/85313 (gcc/fortran/openmp.c: 2 * confused logic ?)
Jakub Jelinek [Mon, 25 Jun 2018 17:47:12 +0000 (19:47 +0200)] 
backport: re PR fortran/85313 (gcc/fortran/openmp.c: 2 * confused logic ?)

Backported from mainline
2018-04-10  Jakub Jelinek  <jakub@redhat.com>

PR fortran/85313
* openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
(resolve_oacc_nested_loops): Likewise.  Formatting fix.

* gfortran.dg/gomp/pr85313.f90: New test.

From-SVN: r262095

7 years agobackport: re PR tree-optimization/85257 (wrong code with -O -fno-tree-ccp and reading...
Jakub Jelinek [Mon, 25 Jun 2018 17:45:48 +0000 (19:45 +0200)] 
backport: re PR tree-optimization/85257 (wrong code with -O -fno-tree-ccp and reading zeroed vector member)

Backported from mainline
2018-04-07  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/85257
* fold-const.c (native_encode_vector): If not all elts could fit
and off is -1, return 0 rather than offset.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
(offset - offset2) / BITS_PER_UNIT as 4th argument to
native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
adjust buffer in native_interpret_expr call.

* gcc.dg/pr85257.c: New test.

From-SVN: r262094

7 years agobackport: re PR debug/85252 (ICE with -g for static zero-length array initialization)
Jakub Jelinek [Mon, 25 Jun 2018 17:44:31 +0000 (19:44 +0200)] 
backport: re PR debug/85252 (ICE with -g for static zero-length array initialization)

Backported from mainline
2018-04-06  Jakub Jelinek  <jakub@redhat.com>

PR debug/85252
* dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.

* gcc.dg/debug/pr85252.c: New test.

From-SVN: r262093

7 years agobackport: re PR rtl-optimization/85167 (shrink-wrap.c:333:15: runtime error with...
Jakub Jelinek [Mon, 25 Jun 2018 17:43:41 +0000 (19:43 +0200)] 
backport: re PR rtl-optimization/85167 (shrink-wrap.c:333:15: runtime error with UBSAN)

Backported from mainline
2018-04-03  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/85167
* shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
bb_defs if *split_p, instead preinitialize it to NULL.

* gcc.dg/pr85167.c: New test.

From-SVN: r262091

7 years agobackport: re PR c++/85147 (ICE with invalid variadic template-template parameter)
Jakub Jelinek [Mon, 25 Jun 2018 17:42:51 +0000 (19:42 +0200)] 
backport: re PR c++/85147 (ICE with invalid variadic template-template parameter)

Backported from mainline
2018-04-03  Jakub Jelinek  <jakub@redhat.com>

PR c++/85147
* pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.

* g++.dg/cpp0x/pr85147.C: New test.

From-SVN: r262090

7 years agobackport: re PR c++/85140 (ICE with invalid use of alignas)
Jakub Jelinek [Mon, 25 Jun 2018 17:42:12 +0000 (19:42 +0200)] 
backport: re PR c++/85140 (ICE with invalid use of alignas)

Backported from mainline
2018-04-03  Jakub Jelinek  <jakub@redhat.com>

PR c++/85140
* name-lookup.c (handle_namespace_attrs): Return early if attributes
is error_mark_node.

* g++.dg/cpp0x/gen-attrs-64.C: New test.

From-SVN: r262089

7 years agobackport: re PR c++/84791 (ICE with broken OpenMP reduction clause)
Jakub Jelinek [Mon, 25 Jun 2018 17:41:34 +0000 (19:41 +0200)] 
backport: re PR c++/84791 (ICE with broken OpenMP reduction clause)

Backported from mainline
2018-03-30  Jakub Jelinek  <jakub@redhat.com>

PR c++/84791
* semantics.c (finish_omp_reduction_clause): If
OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
even if processing_template_decl.

* g++.dg/gomp/pr84791.C: New test.

From-SVN: r262088

7 years agobackport: re PR c++/85076 (ICE with invalid template used as lambda argument)
Jakub Jelinek [Mon, 25 Jun 2018 17:40:52 +0000 (19:40 +0200)] 
backport: re PR c++/85076 (ICE with invalid template used as lambda argument)

Backported from mainline
2018-03-27  Jakub Jelinek  <jakub@redhat.com>

PR c++/85076
* tree.c (cp_build_reference_type): If to_type is error_mark_node,
return it right away.

* g++.dg/cpp1y/pr85076.C: New test.

From-SVN: r262087

7 years agobackport: re PR c++/85068 (ICE with invalid covariant return type hierarchy)
Jakub Jelinek [Mon, 25 Jun 2018 17:39:55 +0000 (19:39 +0200)] 
backport: re PR c++/85068 (ICE with invalid covariant return type hierarchy)

Backported from mainline
2018-03-27  Jakub Jelinek  <jakub@redhat.com>

PR c++/85068
* class.c (update_vtable_entry_for_fn): Don't ICE if base_binfo
is NULL.  Assert if thunk_binfo is NULL then errorcount is non-zero.

* g++.dg/inherit/covariant22.C: New test.

From-SVN: r262086

7 years agobackport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p...
Jakub Jelinek [Mon, 25 Jun 2018 17:39:11 +0000 (19:39 +0200)] 
backport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p, at alias.c:3003)

Backported from mainline
2018-03-23  Jakub Jelinek  <jakub@redhat.com>

PR inline-asm/85022
* emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
known size by default.

From-SVN: r262085

7 years agobackport: re PR inline-asm/85034 (-O1 internal compiler error: in elimination_costs_i...
Jakub Jelinek [Mon, 25 Jun 2018 17:38:29 +0000 (19:38 +0200)] 
backport: re PR inline-asm/85034 (-O1 internal compiler error: in elimination_costs_in_insn, at reload1.c:3633)

Backported from mainline
2018-03-23  Jakub Jelinek  <jakub@redhat.com>

PR inline-asm/85034
* function.c (match_asm_constraints_1): Don't optimize if input
doesn't satisfy general_operand predicate for output's mode.

* gcc.target/i386/pr85034.c: New test.

From-SVN: r262084

7 years agobackport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p...
Jakub Jelinek [Mon, 25 Jun 2018 17:37:40 +0000 (19:37 +0200)] 
backport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p, at alias.c:3003)

Backported from mainline
2018-03-23  Jakub Jelinek  <jakub@redhat.com>

PR inline-asm/85022
* alias.c (write_dependence_p): Don't require for x_canonicalized
non-VOIDmode if x has VOIDmode.

* c-c++-common/torture/pr85022.c: New test.

From-SVN: r262083

7 years agobackport: re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p...
Jakub Jelinek [Mon, 25 Jun 2018 17:37:02 +0000 (19:37 +0200)] 
backport: re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1870 (reg_overlap_mentioned_p()/match_asm_constraints_1()))

Backported from mainline
2018-03-22  Jakub Jelinek  <jakub@redhat.com>

PR inline-asm/84941
* function.c (match_asm_constraints_1): Don't do the optimization
if input isn't a REG, SUBREG, MEM or constant.

* gcc.dg/pr84941.c: New test.

From-SVN: r262082

7 years agobackport: re PR debug/84875 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348...
Jakub Jelinek [Mon, 25 Jun 2018 17:36:14 +0000 (19:36 +0200)] 
backport: re PR debug/84875 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348 on s390x)

Backported from mainline
2018-03-20  Jakub Jelinek  <jakub@redhat.com>

PR debug/84875
* dce.c (delete_unmarked_insns): Don't remove frame related noop moves
holding REG_CFA_RESTORE notes, instead turn them into a USE.

* gcc.dg/pr84875.c: New test.

From-SVN: r262081

7 years agobackport: re PR c/84953 (misleading warning from strpbrk(x,""))
Jakub Jelinek [Mon, 25 Jun 2018 17:35:29 +0000 (19:35 +0200)] 
backport: re PR c/84953 (misleading warning from strpbrk(x,""))

Backported from mainline
2018-03-20  Jakub Jelinek  <jakub@redhat.com>

PR c/84953
* builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
instead of TREE_TYPE (s1) for the return value.

* gcc.dg/pr84953.c: New test.

From-SVN: r262080

7 years agobackport: re PR target/84899 (ICE: in final_scan_insn_1, at final.c:3139 (error:...
Jakub Jelinek [Mon, 25 Jun 2018 17:34:55 +0000 (19:34 +0200)] 
backport: re PR target/84899 (ICE: in final_scan_insn_1, at final.c:3139 (error: could not split insn))

Backported from mainline
2018-03-16  Jakub Jelinek  <jakub@redhat.com>

PR target/84899
* postreload.c (reload_combine_recognize_pattern): Perform
INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
truncate_int_for_mode the result for the destination's mode.

* gcc.dg/pr84899.c: New test.

From-SVN: r262079

7 years agobackport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp...
Jakub Jelinek [Mon, 25 Jun 2018 17:34:18 +0000 (19:34 +0200)] 
backport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)

Backported from mainline
2018-03-16  Jakub Jelinek  <jakub@redhat.com>

PR c++/84874
* g++.dg/cpp1z/desig8.C: New test.

From-SVN: r262078

7 years agobackport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp...
Jakub Jelinek [Mon, 25 Jun 2018 17:33:40 +0000 (19:33 +0200)] 
backport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)

Backported from mainline
2018-03-16  Jakub Jelinek  <jakub@redhat.com>

PR c++/84874
* decl.c (reshape_init_class): Don't assert d->cur->index == field
if d->cur->index is a FIELD_DECL, instead set field to d->cur->index.

* g++.dg/cpp1z/desig7.C: New test.

From-SVN: r262077

7 years agobackport: re PR c++/79085 (ICE with placement new to unaligned location)
Jakub Jelinek [Mon, 25 Jun 2018 17:32:55 +0000 (19:32 +0200)] 
backport: re PR c++/79085 (ICE with placement new to unaligned location)

Backported from mainline
2018-03-15  Jakub Jelinek  <jakub@redhat.com>

PR c++/79085
* calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
check and use address of target always.

* g++.dg/opt/pr79085.C: New test.

From-SVN: r262076

7 years agobackport: re PR c++/84222 ([[deprecated]] class complains about internal class usage)
Jakub Jelinek [Mon, 25 Jun 2018 17:32:10 +0000 (19:32 +0200)] 
backport: re PR c++/84222 ([[deprecated]] class complains about internal class usage)

Backported from mainline
2018-03-15  Jakub Jelinek  <jakub@redhat.com>

PR c++/84222
* cp-tree.h (cp_warn_deprecated_use): Declare.
* tree.c (cp_warn_deprecated_use): New function.
* typeck2.c (build_functional_cast): Use it.
* decl.c (grokparms): Likewise.
(grokdeclarator): Likewise.  Temporarily push nested class scope
around grokparms call for out of class member definitions.

* g++.dg/warn/deprecated.C (T::member3): Change dg-warning to dg-bogus.
* g++.dg/warn/deprecated-6.C (T::member3): Likewise.
* g++.dg/warn/deprecated-13.C: New test.

From-SVN: r262075

7 years agobackport: re PR target/84772 (powerpc-spe: Spurious "is used uninitialized" warning...
Jakub Jelinek [Mon, 25 Jun 2018 17:31:23 +0000 (19:31 +0200)] 
backport: re PR target/84772 (powerpc-spe: Spurious "is used uninitialized" warning, or possibly incorrect codegen for va_arg(long double))

Backported from mainline
2018-03-09  Jakub Jelinek  <jakub@redhat.com>

PR target/84772
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.

* gcc.dg/pr84772.c: New test.

From-SVN: r262074

7 years agobackport: re PR c++/84076 (Warning about objects through POD mistakenly claims the...
Jakub Jelinek [Mon, 25 Jun 2018 17:30:03 +0000 (19:30 +0200)] 
backport: re PR c++/84076 (Warning about objects through POD mistakenly claims the object is a pointer)

Backported from mainline
2018-03-09  Jason Merrill  <jason@redhat.com>
    Jakub Jelinek  <jakub@redhat.com>

PR c++/84076
* call.c (convert_arg_to_ellipsis): Instead of cp_build_addr_expr
build ADDR_EXPR with REFERENCE_TYPE.
(build_over_call): For purposes of check_function_arguments, if
argarray[j] is ADDR_EXPR with REFERENCE_TYPE created above, use
its operand rather than the argument itself.

* g++.dg/warn/Wformat-2.C: New test.

From-SVN: r262073

7 years agobackport: re PR c++/84767 (ICE with pointer to VLA)
Jakub Jelinek [Mon, 25 Jun 2018 17:29:17 +0000 (19:29 +0200)] 
backport: re PR c++/84767 (ICE with pointer to VLA)

Backported from mainline
2018-03-09  Jakub Jelinek  <jakub@redhat.com>

PR c++/84767
* tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
decl, use remap_type if we want to use the type.

* g++.dg/ext/vla18.C: New test.

From-SVN: r262072

7 years agobackport: re PR tree-optimization/84739 (ICE in get_value_for_expr, at tree-ssa-ccp...
Jakub Jelinek [Mon, 25 Jun 2018 17:28:32 +0000 (19:28 +0200)] 
backport: re PR tree-optimization/84739 (ICE in get_value_for_expr, at tree-ssa-ccp.c:649)

Backported from mainline
2018-03-08  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/84739
* tree-tailcall.c (find_tail_calls): Check call arguments against
DECL_ARGUMENTS (current_function_decl) rather than
DECL_ARGUMENTS (func) when checking for tail recursion.

* gcc.dg/pr84739.c: New test.

From-SVN: r262071

7 years agobackport: re PR target/84700 (ICE on 32-bit BE powerpc targets w/ -misel -O1)
Jakub Jelinek [Mon, 25 Jun 2018 17:27:47 +0000 (19:27 +0200)] 
backport: re PR target/84700 (ICE on 32-bit BE powerpc targets w/ -misel -O1)

Backported from mainline
2018-03-05  Jakub Jelinek  <jakub@redhat.com>

PR target/84700
* combine.c (combine_simplify_rtx): Don't try to simplify if
if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
are equal to x.

* gcc.target/powerpc/pr84700.c: New test.

From-SVN: r262070

7 years agobackport: re PR c++/84662 (internal compiler error: tree check: expected class 'type...
Jakub Jelinek [Mon, 25 Jun 2018 17:26:53 +0000 (19:26 +0200)] 
backport: re PR c++/84662 (internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in is_bitfield_expr_with_lowered_type, at cp/typeck.c:1944)

Backported from mainline
2018-03-02  Jakub Jelinek  <jakub@redhat.com>

PR c++/84662
* pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use
RETURN instead of return.
<case POINTER_PLUS_EXPR>: Likewise.
<case CONVERT_EXPR>: If op0 is error_mark_node, just return
it instead of wrapping it into CONVERT_EXPR.

* g++.dg/cpp1y/pr84662.C: New test.

From-SVN: r262069

7 years agobackport: re PR inline-asm/84625 (ICE with empty constraint and vector constant)
Jakub Jelinek [Mon, 25 Jun 2018 17:25:41 +0000 (19:25 +0200)] 
backport: re PR inline-asm/84625 (ICE with empty constraint and vector constant)

Backported from mainline
2018-03-02  Jakub Jelinek  <jakub@redhat.com>

PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
zero vector.

* gcc.target/i386/pr84625.c: New test.

From-SVN: r262068

7 years agobackport: re PR sanitizer/70875 (ICE in get_ubsan_type_info_for_type with -fsanitize...
Jakub Jelinek [Mon, 25 Jun 2018 17:24:42 +0000 (19:24 +0200)] 
backport: re PR sanitizer/70875 (ICE in get_ubsan_type_info_for_type with -fsanitize=undefined)

Backported from mainline
2018-03-02  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/70875
* gcc.dg/ubsan/bounds-3.c: Add -fno-sanitize-recover=bounds to
dg-options and dg-shouldfail "ubsan" directive.

From-SVN: r262067

7 years agobackport: re PR c++/84558 (ICE with invalid constexpr constructor)
Jakub Jelinek [Mon, 25 Jun 2018 17:24:06 +0000 (19:24 +0200)] 
backport: re PR c++/84558 (ICE with invalid constexpr constructor)

Backported from mainline
2018-02-26  Jakub Jelinek  <jakub@redhat.com>

PR c++/84558
* constexpr.c (cxx_eval_vec_init_1): For reuse, treat NULL eltinit like
a valid constant initializer.  Formatting fixes.

* g++.dg/cpp1y/pr84558.C: New test.

From-SVN: r262066

7 years agobackport: re PR c++/84448 (ICE with broken condition in parallel for loop)
Jakub Jelinek [Mon, 25 Jun 2018 17:23:21 +0000 (19:23 +0200)] 
backport: re PR c++/84448 (ICE with broken condition in parallel for loop)

Backported from mainline
2018-02-19  Jakub Jelinek  <jakub@redhat.com>

PR c++/84448
* parser.c (cp_parser_binary_expression): For no_toplevel_fold_p, if
either operand is error_mark_node, set current.lhs to that instead of
creating a binary op with error_mark_node operands.

* g++.dg/gomp/pr84448.C: New test.

From-SVN: r262065

7 years agobackport: re PR ipa/84425 (Hang in ipa-inline.c starting with r250048)
Jakub Jelinek [Mon, 25 Jun 2018 17:22:32 +0000 (19:22 +0200)] 
backport: re PR ipa/84425 (Hang in ipa-inline.c starting with r250048)

Backported from mainline
2018-02-16  Jakub Jelinek  <jakub@redhat.com>

PR ipa/84425
* ipa-inline.c (inline_small_functions): Fix a typo.

* gcc.c-torture/compile/pr84425.c: New test.

From-SVN: r262064

7 years agobackport: re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to...
Jakub Jelinek [Mon, 25 Jun 2018 17:21:47 +0000 (19:21 +0200)] 
backport: re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to one array to overwrite another)

Backported from mainline
2018-02-13  Jakub Jelinek  <jakub@redhat.com>

PR c/82210
* stor-layout.c (place_field): For variable length fields, adjust
offset_align afterwards not just based on the field's alignment,
but also on the size.

* gcc.c-torture/execute/pr82210.c: New test.

From-SVN: r262063

7 years agobackport: re PR c++/84341 (ICE with #pragma omp atomic)
Jakub Jelinek [Mon, 25 Jun 2018 17:21:04 +0000 (19:21 +0200)] 
backport: re PR c++/84341 (ICE with #pragma omp atomic)

Backported from mainline
2018-02-12  Jakub Jelinek  <jakub@redhat.com>

PR c++/84341
* parser.c (cp_parser_binary_expression): Use build_min instead of
build2_loc to build the no_toplevel_fold_p toplevel binary expression.

* c-c++-common/gomp/pr84341.c: New test.

From-SVN: r262062

7 years agobackport: re PR sanitizer/83987 (ICE with OpenMP, sanitizer and virtual bases)
Jakub Jelinek [Mon, 25 Jun 2018 17:20:18 +0000 (19:20 +0200)] 
backport: re PR sanitizer/83987 (ICE with OpenMP, sanitizer and virtual bases)

Backported from mainline
2018-02-10  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/83987
* omp-low.c (maybe_remove_omp_member_access_dummy_vars,
remove_member_access_dummy_vars): New functions.
(lower_omp_for, lower_omp_taskreg, lower_omp_target,
lower_omp_1, execute_lower_omp): Use them.

* tree.c (cp_free_lang_data): Revert 2018-01-23 change.

* g++.dg/ubsan/pr83987-2.C: New test.

From-SVN: r262061

7 years agobackport: re PR target/83986 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348)
Jakub Jelinek [Mon, 25 Jun 2018 17:19:13 +0000 (19:19 +0200)] 
backport: re PR target/83986 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348)

Backported from mainline
2018-01-30  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/83986
* sched-deps.c (sched_analyze_insn): For frame related insns, add anti
dependence against last_pending_memory_flush in addition to
pending_jump_insns.

* gcc.dg/pr83986.c: New test.

From-SVN: r262059

7 years agobackport: re PR libgomp/84096 (Wrong prototype for omp_init_nest_lock_with_hint(...
Jakub Jelinek [Mon, 25 Jun 2018 17:17:50 +0000 (19:17 +0200)] 
backport: re PR libgomp/84096 (Wrong prototype for omp_init_nest_lock_with_hint() in "omp.h.in")

Backported from mainline
2018-01-29  Christoph Spiel  <cspiel@freenet.de>
    Jakub Jelinek  <jakub@redhat.com>

PR libgomp/84096
* omp.h.in (omp_init_nest_lock_with_hint): Use omp_nest_lock_t
instead of omp_lock_t.

From-SVN: r262058

7 years agobackport: re PR middle-end/84040 (compilation time of gcc.c-torture/compile/limits...
Jakub Jelinek [Mon, 25 Jun 2018 17:14:30 +0000 (19:14 +0200)] 
backport: re PR middle-end/84040 (compilation time of gcc.c-torture/compile/limits-blockid.c is 50x slower)

Backported from mainline
2018-01-27  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/84040
* sched-deps.c (sched_macro_fuse_insns): Return immediately if
!insn_set.

From-SVN: r262057

7 years agobackport: re PR sanitizer/83987 (ICE with OpenMP, sanitizer and virtual bases)
Jakub Jelinek [Mon, 25 Jun 2018 17:14:01 +0000 (19:14 +0200)] 
backport: re PR sanitizer/83987 (ICE with OpenMP, sanitizer and virtual bases)

Backported from mainline
2018-01-23  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/83987
* tree.c (cp_free_lang_data): Change DECL_VALUE_EXPR of
DECL_OMP_PRIVATIZED_MEMBER vars to error_mark_node.

* g++.dg/ubsan/pr83987.C: New test.

From-SVN: r262056

7 years agobackport: re PR target/83930 (ICE: RTL check: expected code 'const_int', have 'mem...
Jakub Jelinek [Mon, 25 Jun 2018 17:13:04 +0000 (19:13 +0200)] 
backport: re PR target/83930 (ICE: RTL check: expected code 'const_int', have 'mem' in simplify_binary_operation_1, at simplify-rtx.c:3302)

Backported from mainline
2018-01-20  Jakub Jelinek  <jakub@redhat.com>

PR target/83930
* simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
UINTVAL (trueop1) instead of INTVAL (op1).

* gcc.dg/pr83930.c: New test.

From-SVN: r262055

7 years agobackport: re PR c++/83824 (ICE on invalid C++ code with alignas: in chainon, at tree...
Jakub Jelinek [Mon, 25 Jun 2018 17:12:28 +0000 (19:12 +0200)] 
backport: re PR c++/83824 (ICE on invalid C++ code with alignas: in chainon, at tree.c:3037)

Backported from mainline
2018-01-18  Jakub Jelinek  <jakub@redhat.com>

PR c++/83824
* parser.c (attr_chainon): New function.
(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
cp_parser_namespace_definition, cp_parser_init_declarator,
cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
cp_parser_gnu_attributes_opt): Use it.
(cp_parser_member_declaration, cp_parser_objc_class_ivars,
cp_parser_objc_struct_declaration): Likewise.  Don't reset
prefix_attributes if attributes is error_mark_node.

* g++.dg/cpp0x/pr83824.C: New test.

From-SVN: r262054

7 years agobackport: re PR preprocessor/83722 (the ICE dumper doesn't comment-out some error...
Jakub Jelinek [Mon, 25 Jun 2018 17:11:36 +0000 (19:11 +0200)] 
backport: re PR preprocessor/83722 (the ICE dumper doesn't comment-out some error messages)

Backported from mainline
2018-01-09  Jakub Jelinek  <jakub@redhat.com>

PR preprocessor/83722
* gcc.c (try_generate_repro): Pass
&temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
&temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
do_report_bug.

From-SVN: r262053

7 years agobackport: re PR tree-optimization/83605 (ICE: verify_gimple failed (error: dead STMT...
Jakub Jelinek [Mon, 25 Jun 2018 17:11:05 +0000 (19:11 +0200)] 
backport: re PR tree-optimization/83605 (ICE: verify_gimple failed (error: dead STMT in EH table))

Backported from mainline
2018-01-05  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/83605
* gimple-ssa-strength-reduction.c: Include tree-eh.h.
(find_candidates_dom_walker::before_dom_children): Ignore stmts that
can throw.

* gcc.dg/pr83605.c: New test.

From-SVN: r262052

7 years agobackport: re PR c++/83553 (compiler removes body of the for-loop, although there...
Jakub Jelinek [Mon, 25 Jun 2018 17:10:18 +0000 (19:10 +0200)] 
backport: re PR c++/83553 (compiler removes body of the for-loop, although there is a case label inside)

Backported from mainline
2017-12-23  Jakub Jelinek  <jakub@redhat.com>

PR c++/83553
* fold-const.c (struct contains_label_data): New type.
(contains_label_1): Return non-NULL even for CASE_LABEL_EXPR, unless
inside of a SWITCH_BODY seen during the walk.
(contains_label_p): Use walk_tree instead of
walk_tree_without_duplicates, prepare data for contains_label_1 and
provide own pset.

* c-c++-common/torture/pr83553.c: New test.

From-SVN: r262051

7 years agobackport: re PR debug/83550 (Bad location of DW_TAG_structure_type with forward decla...
Jakub Jelinek [Mon, 25 Jun 2018 17:08:02 +0000 (19:08 +0200)] 
backport: re PR debug/83550 (Bad location of DW_TAG_structure_type with forward declaration since r224161)

Backported from mainline
2017-12-22  Jakub Jelinek  <jakub@redhat.com>

PR debug/83550
* c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
TYPE_STUB_DECL and call rest_of_type_compilation before processing
incomplete vars rather than after it.

* c-c++-common/dwarf2/pr83550.c: New test.

From-SVN: r262050

7 years agobackport: re PR rtl-optimization/80747 (gcc.dg/tree-ssa/tailrecursion-4.c fails with...
Jakub Jelinek [Mon, 25 Jun 2018 17:05:01 +0000 (19:05 +0200)] 
backport: re PR rtl-optimization/80747 (gcc.dg/tree-ssa/tailrecursion-4.c fails with ICE when compiled with options "-fprofile-use -freorder-blocks-and-partition")

Backported from mainline
2017-12-21  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/80747
PR rtl-optimization/83512
* cfgrtl.c (force_nonfallthru_and_redirect): When splitting
succ edge from ENTRY, copy partition from e->dest to the newly
created bb.
* bb-reorder.c (reorder_basic_blocks_simple): If last_tail is
ENTRY, use BB_PARTITION of its successor block as current_partition.
Don't copy partition when splitting succ edge from ENTRY.

* gcc.dg/pr80747.c: New test.
* gcc.dg/pr83512.c: New test.

From-SVN: r262049

7 years agobackport: re PR tree-optimization/83523 (ICE: verify_gimple failed (error: statement...
Jakub Jelinek [Mon, 25 Jun 2018 17:04:14 +0000 (19:04 +0200)] 
backport: re PR tree-optimization/83523 (ICE: verify_gimple failed (error: statement marked for throw, but doesn't))

Backported from mainline
2017-12-21  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/83523
* tree-ssa-math-opts.c (is_widening_mult_p): Return false if
for INTEGER_TYPE TYPE_OVERFLOW_TRAPS.
(convert_mult_to_fma): Likewise.

* g++.dg/tree-ssa/pr83523.C: New test.

From-SVN: r262048

7 years agobackport: re PR tree-optimization/83521 (ICE: verify_gimple failed (error: invalid...
Jakub Jelinek [Mon, 25 Jun 2018 17:03:26 +0000 (19:03 +0200)] 
backport: re PR tree-optimization/83521 (ICE: verify_gimple failed (error: invalid operand in unary operation))

Backported from mainline
2017-12-21  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/83521
* tree-ssa-phiopt.c (factor_out_conditional_conversion): Use
gimple_build_assign without code on result of
fold_build1 (VIEW_CONVERT_EXPR, ...), as it might not create
a VIEW_CONVERT_EXPR.

* gcc.dg/pr83521.c: New test.

From-SVN: r262047

7 years agobackport: re PR ipa/82801 (Internal compiler error with Eigen and __attribute__(...
Jakub Jelinek [Mon, 25 Jun 2018 17:02:47 +0000 (19:02 +0200)] 
backport: re PR ipa/82801 (Internal compiler error with Eigen and __attribute__((always_inline, flatten)))

Backported from mainline
2017-12-19  Jakub Jelinek  <jakub@redhat.com>

PR ipa/82801
PR ipa/83346
* ipa-inline.c (flatten_remove_node_hook): New function.
(ipa_inline): Keep only nodes with flatten attribute at the end of
the array in the order from ipa_reverse_postorder, only walk that
portion of array for flattening, if there is more than one such
node, temporarily register a removal hook and ignore removed nodes.

* g++.dg/ipa/pr82801.C: New test.

From-SVN: r262046

7 years agobackport: re PR c++/79650 (ICE on invalid c++ code with label arithmetic in convert_n...
Jakub Jelinek [Mon, 25 Jun 2018 17:01:10 +0000 (19:01 +0200)] 
backport: re PR c++/79650 (ICE on invalid c++ code with label arithmetic in convert_nontype_argument (pt.c:6515))

Backported from mainline
2017-12-14  Jakub Jelinek  <jakub@redhat.com>

PR c++/79650
* pt.c (convert_nontype_argument): Diagnose
reduced_constant_expression_p expressions that aren't INTEGER_CST.

* g++.dg/template/pr79650.C: New test.

From-SVN: r262045

7 years agobackport: re PR target/81906 (Calls to rint() wrongly optimized away starting in...
Jakub Jelinek [Mon, 25 Jun 2018 16:59:37 +0000 (18:59 +0200)] 
backport: re PR target/81906 (Calls to rint() wrongly optimized away starting in g++ 6)

Backported from mainline
2017-12-08  Joseph Myers  <joseph@codesourcery.com>
    Alexander Monakov  <amonakov@ispras.ru>
    Jakub Jelinek  <jakub@redhat.com>

PR target/81906
* config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.

* gcc.target/i386/pr81906.c: New test.

From-SVN: r262044

7 years agobackport: re PR c++/80259 (ICE deleting friend function)
Jakub Jelinek [Mon, 25 Jun 2018 16:58:35 +0000 (18:58 +0200)] 
backport: re PR c++/80259 (ICE deleting friend function)

Backported from mainline
2017-12-06  Jakub Jelinek  <jakub@redhat.com>

PR c++/80259
* decl2.c (grokfield): Diagnose = delete redefinition of a friend.

* g++.dg/cpp0x/pr80259.C: New test.

From-SVN: r262043

7 years agobackport: re PR sanitizer/81212 (-Wreturn-type is disabled when used together with...
Jakub Jelinek [Mon, 25 Jun 2018 16:57:59 +0000 (18:57 +0200)] 
backport: re PR sanitizer/81212 (-Wreturn-type is disabled when used together with -fsanitize=return)

Backported from mainline
2017-12-02  Jakub Jelinek  <jakub@redhat.com>

PR c++/81212
* tree-cfg.c (pass_warn_function_return::execute): Handle
__builtin_ubsan_handle_missing_return like __builtin_unreachable
with BUILTINS_LOCATION.

* g++.dg/ubsan/pr81212.C: New test.

From-SVN: r262042

7 years agobackport: re PR target/78643 (ICE in convert_move, at expr.c:230)
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.

* gcc.target/i386/pr80583.c: New test.

From-SVN: r262041

7 years agobackport: re PR target/80819 (Useless store to the stack in _mm_set_epi64x with...
Jakub Jelinek [Mon, 25 Jun 2018 16:56:33 +0000 (18:56 +0200)] 
backport: re PR target/80819 (Useless store to the stack  in _mm_set_epi64x with SSE4 -mno-avx)

Backported from mainline
2017-11-29  Jakub Jelinek  <jakub@redhat.com>

PR target/80819
* config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
alternative.

* gcc.target/i386/pr80819-1.c: New test.
* gcc.target/i386/pr80819-2.c: New test.

From-SVN: r262040

7 years agobackport: re PR fortran/81304 (Bogus warning with -Wsurprising and -fopenmp: Type...
Jakub Jelinek [Mon, 25 Jun 2018 16:55:44 +0000 (18:55 +0200)] 
backport: re PR fortran/81304 (Bogus warning with -Wsurprising and -fopenmp: Type specified for intrinsic function 'min' / 'max')

Backported from mainline
2017-11-24  Jakub Jelinek  <jakub@redhat.com>

PR fortran/81304
* trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
attr.implicit_type in intrinsic_sym to avoid undesirable warning.

* testsuite/libgomp.fortran/pr81304.f90: New test.

From-SVN: r262039

7 years agobackport: re PR sanitizer/83014 (ICE in pretty-print with -fsanitize=bounds)
Jakub Jelinek [Mon, 25 Jun 2018 16:54:49 +0000 (18:54 +0200)] 
backport: re PR sanitizer/83014 (ICE in pretty-print with -fsanitize=bounds)

Backported from mainline
2017-11-24  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/83014
* ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
tree_to_uhwi twice.

* gcc.dg/ubsan/pr83014.c: New test.

From-SVN: r262038

7 years agobackport: tree-object-size.c (pass_through_call): Do not handle BUILT_IN_STPNCPY_CHK...
Jakub Jelinek [Mon, 25 Jun 2018 16:53:57 +0000 (18:53 +0200)] 
backport: tree-object-size.c (pass_through_call): Do not handle BUILT_IN_STPNCPY_CHK which is not a pass through call.

Backported from mainline
2017-11-24  Jakub Jelinek  <jakub@redhat.com>

* tree-object-size.c (pass_through_call): Do not handle
BUILT_IN_STPNCPY_CHK which is not a pass through call.

* gcc.dg/builtin-object-size-18.c: New test.

From-SVN: r262037

7 years agobackport: parser.c (cp_parser_omp_declare): Change return type to bool from void...
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.

From-SVN: r262036

7 years agobackport: re PR fortran/81841 (THREADPRIVATE (OpenMP) wrongly rejected in BLOCK DATA)
Jakub Jelinek [Mon, 25 Jun 2018 16:52:31 +0000 (18:52 +0200)] 
backport: re PR fortran/81841 (THREADPRIVATE (OpenMP) wrongly rejected in BLOCK DATA)

Backported from mainline
2017-11-23  Dirk Broemmel  <d.broemmel@fz-juelich.de>
    Jakub Jelinek  <jakub@redhat.com>

PR fortran/81841
* parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
BLOCK DATA.

* libgomp.fortran/pr81841.f90: New test.

From-SVN: r262035

7 years agobackport: re PR middle-end/82253 (ICE in convert_move, at expr.c:604)
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.

* gfortran.dg/pr82253.f90: New test.

From-SVN: r262034

7 years agobackport: re PR target/82880 (gcc --help=target --help=optimizers hangs on mips)
Jakub Jelinek [Mon, 25 Jun 2018 16:50:58 +0000 (18:50 +0200)] 
backport: re PR target/82880 (gcc --help=target --help=optimizers hangs on mips)

Backported from mainline
2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
    Jakub Jelinek  <jakub@redhat.com>

PR target/82880
* config/mips/frame-header-opt.c (mips_register_frame_header_opt):
Remove static keyword from f variable.

* gcc.dg/opts-8.c: New test.

From-SVN: r262033

7 years agobackport: re PR c++/83059 (ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633)
Jakub Jelinek [Mon, 25 Jun 2018 16:48:43 +0000 (18:48 +0200)] 
backport: re PR c++/83059 (ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633)

Backported from mainline
2017-11-21  Jakub Jelinek  <jakub@redhat.com>

PR c++/83059
* c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
instead of tree_to_uhwi, formatting fix.

* c-c++-common/pr83059.c: New test.

From-SVN: r262032

7 years agobackport: re PR c++/82781 (Vector extension operators return wrong result in constexpr)
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.

* g++.dg/ext/constexpr-pr82781.C: New test.

From-SVN: r262031

7 years agobackport: re PR c++/82159 (ICE: in assign_temp, at function.c:961)
Jakub Jelinek [Mon, 25 Jun 2018 16:46:54 +0000 (18:46 +0200)] 
backport: re PR c++/82159 (ICE: in assign_temp, at function.c:961)

Backported from mainline
2017-10-12  Jakub Jelinek  <jakub@redhat.com>

PR c++/82159
* expr.c (store_field): Don't optimize away bitsize == 0 store
from CALL_EXPR with addressable return type.

* g++.dg/opt/pr82159-2.C: New test.

From-SVN: r262030

7 years agobackport: re PR rtl-optimization/82192 (gcc produces incorrect code with -O2 and...
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.

* gcc.c-torture/execute/pr82192.c: New test.

From-SVN: r262028

7 years agobackport: re PR c/82340 (volatile ignored in compound literal)
Jakub Jelinek [Mon, 25 Jun 2018 16:43:59 +0000 (18:43 +0200)] 
backport: re PR c/82340 (volatile ignored in compound literal)

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: r262027

7 years agobackport: re PR c++/82159 (ICE: in assign_temp, at function.c:961)
Jakub Jelinek [Mon, 25 Jun 2018 16:43:16 +0000 (18:43 +0200)] 
backport: re PR c++/82159 (ICE: in assign_temp, at function.c:961)

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: r262026

7 years agoDaily bump.
GCC Administrator [Mon, 25 Jun 2018 00:16:37 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261999

7 years agoDaily bump.
GCC Administrator [Sun, 24 Jun 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261989

7 years agoFix phi backedge detection in backprop (PR85989)
Richard Sandiford [Sat, 23 Jun 2018 16:18:36 +0000 (16:18 +0000)] 
Fix phi backedge detection in backprop (PR85989)

Backport trunk r261064.

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.

From-SVN: r261985

7 years agoDaily bump.
GCC Administrator [Sat, 23 Jun 2018 00:16:42 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261976

7 years agoDaily bump.
GCC Administrator [Fri, 22 Jun 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261874

7 years agobackport: [multiple changes]
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.

* gcc.dg/vect/pr79920.c: New testcase.

From-SVN: r261842

7 years agobackport: [multiple changes]
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.

From-SVN: r261839

7 years agobackport: [multiple changes]
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.

* gcc.dg/tree-prof/pr66295.c: Remove unsupported dg-error scanning.

From-SVN: r261833

7 years agoDaily bump.
GCC Administrator [Thu, 21 Jun 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261827

7 years agotree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially committed change.
Richard Biener [Wed, 20 Jun 2018 13:16:58 +0000 (13:16 +0000)] 
tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially committed change.

2018-06-20  Richard Biener  <rguenther@suse.de>

* tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially
committed change.

From-SVN: r261801

7 years agobackport: [multiple changes]
Richard Biener [Wed, 20 Jun 2018 13:10:21 +0000 (13:10 +0000)] 
backport: [multiple changes]

2018-06-20  Richard Biener  <rguenther@suse.de>

Backport from mainline
2018-03-16  Richard Biener  <rguenther@suse.de>

PR c/84873
* c-gimplify.c (c_gimplify_expr): Revert previous change.  Instead
unshare the possibly folded expression.

2018-03-15  Richard Biener  <rguenther@suse.de>

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.

* gcc.dg/vect/pr85597.c: New testcase.

From-SVN: r261800

7 years agoBackport PRs 82264, 82285, 82402, 82697, 82765, 83623, 83713
Richard Biener [Wed, 20 Jun 2018 11:09:28 +0000 (11:09 +0000)] 
Backport PRs 82264, 82285, 82402, 82697, 82765, 83623, 83713

2018-06-20  Richard Biener  <rguenther@suse.de>

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.

* gcc.dg/pr82765.c: New testcase.

2018-01-08  Richard Biener  <rguenther@suse.de>

PR middle-end/83713
* convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.

* g++.dg/torture/pr83713.C: New testcase.

From-SVN: r261799

7 years agoDaily bump.
GCC Administrator [Wed, 20 Jun 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261776

7 years agoxtensa: fix PR target/65416
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.

From-SVN: r261765

7 years agoDaily bump.
GCC Administrator [Tue, 19 Jun 2018 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261721

7 years agoDaily bump.
GCC Administrator [Mon, 18 Jun 2018 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261692

7 years agoDaily bump.
GCC Administrator [Sun, 17 Jun 2018 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261683

7 years agoDaily bump.
GCC Administrator [Sat, 16 Jun 2018 00:16:23 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261671

7 years agoPartial backport r256656
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.

From-SVN: r261621

7 years agoDaily bump.
GCC Administrator [Fri, 15 Jun 2018 00:16:26 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261614

7 years agoDaily bump.
GCC Administrator [Thu, 14 Jun 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261577

7 years agoDaily bump.
GCC Administrator [Wed, 13 Jun 2018 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261532

7 years agoDaily bump.
GCC Administrator [Tue, 12 Jun 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261469

7 years agoDaily bump.
GCC Administrator [Mon, 11 Jun 2018 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261390

7 years agoDaily bump.
GCC Administrator [Sun, 10 Jun 2018 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261378

7 years agore PR fortran/85138 (ICE with generic function)
Steven G. Kargl [Sat, 9 Jun 2018 18:35:58 +0000 (18:35 +0000)] 
re PR fortran/85138 (ICE with generic function)

2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/85138
PR fortran/85996
PR fortran/86051
* decl.c (gfc_match_char_spec): Use private namespace in attempt to
reduce a charlen to a constant.

2018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/85138
PR fortran/85996
PR fortran/86051
* gfortran.dg/pr85138_1.f90: New test.
* gfortran.dg/pr85138_2.f90: Ditto.
* gfortran.dg/pr85996.f90: Ditto.

From-SVN: r261372

7 years agoDaily bump.
GCC Administrator [Sat, 9 Jun 2018 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261354

7 years agoDaily bump.
GCC Administrator [Fri, 8 Jun 2018 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261300

7 years agobackport: re PR target/63177 (Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend...
Peter Bergner [Thu, 7 Jun 2018 14:03:35 +0000 (09:03 -0500)] 
backport: re PR target/63177 (Powerpc no-vfa-vect-depend-2.c and no-vfa-vect-depend-3.c failures)

Backport from mainline
2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>

PR target/63177
* /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
Don't handle -mcpu=power8 if -mpower9-vector is also used.

From-SVN: r261277

7 years agoDaily bump.
GCC Administrator [Thu, 7 Jun 2018 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261256

7 years agoDaily bump.
GCC Administrator [Wed, 6 Jun 2018 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261223

7 years agoS/390: Fix __builtin_tbeginc signature
Andreas Krebbel [Tue, 5 Jun 2018 14:08:59 +0000 (14:08 +0000)] 
S/390: Fix __builtin_tbeginc signature

The builtin was accidentally defined to have an integer return value.
Fixed with the attached patch.

gcc/ChangeLog:

2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390-builtin-types.def: Add void function type.
* config/s390/s390-builtins.def: Use the function type for the
tbeginc builtin.

gcc/testsuite/ChangeLog:

2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/htm-builtins-compile-4.c: New test.

From-SVN: r261203

7 years agoDaily bump.
GCC Administrator [Tue, 5 Jun 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r261177