]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
7 years agoDaily bump.
GCC Administrator [Sun, 8 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262502

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

From-SVN: r262489

7 years agoDaily bump.
GCC Administrator [Fri, 6 Jul 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262459

7 years agobackport: re PR libstdc++/86272 (__gnu_debug::string uses undefined __glibcxx_check_i...
François Dumont [Thu, 5 Jul 2018 20:51:27 +0000 (20:51 +0000)] 
backport: re PR libstdc++/86272 (__gnu_debug::string uses undefined __glibcxx_check_insert_range2)

2018-07-05  François Dumont  <fdumont@gcc.gnu.org>

Backport from mainline
2018-07-04  François Dumont  <fdumont@gcc.gnu.org>

PR libstdc++/86272
* include/debug/string
(__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
Use __glibcxx_check_insert_range.

From-SVN: r262455

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

From-SVN: r262425

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

From-SVN: r262361

7 years agore PR fortran/82969 (ICE in gfc_class_vptr_get, at fortran/trans-expr.c:211)
Paul Thomas [Tue, 3 Jul 2018 10:45:52 +0000 (10:45 +0000)] 
re PR fortran/82969 (ICE in gfc_class_vptr_get, at fortran/trans-expr.c:211)

2018-07-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82969
PR fortran/86242
* trans-array.c (structure_alloc_comps): Do not explicitly copy
procedure pointer components.

2018-07-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82969
PR fortran/86242
* gfortran.dg/proc_ptr_50.f90: New test.

From-SVN: r262339

7 years agoDaily bump.
GCC Administrator [Tue, 3 Jul 2018 00:16:26 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262323

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

From-SVN: r262291

7 years ago[multiple changes]
David Edelsohn [Sun, 1 Jul 2018 14:57:03 +0000 (14:57 +0000)] 
[multiple changes]

2018-06-27  David Edelsohn  <dje.gcc@gmail.com>

        2018-06-19  Tony Reix  <tony.reix@atos.com>
            Damien Bergamini  <damien.bergamini@atos.com>
            David Edelsohn  <dje.gcc@gmail.com>

        * collect2.c (static_obj): New variable.
        (static_libs): New variable.
        (is_in_list): Uncomment declaration.
        (main): Track AIX libraries linked statically.
        (is_in_list): Uncomment definition.
        (scan_prog_file): Don't add AIX shared libraries initializer
        to constructor list if linking statically.

From-SVN: r262285

7 years agoDaily bump.
GCC Administrator [Sun, 1 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262279

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

From-SVN: r262263

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

From-SVN: r262237

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

From-SVN: r262200

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

From-SVN: r262168

7 years agobackport: rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu...
Kelvin Nilsen [Tue, 26 Jun 2018 17:24:54 +0000 (17:24 +0000)] 
backport: rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu (vector unsigned long long...

gcc/ChangeLog:

2018-06-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

Backported from mainline
2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.

gcc/testsuite/ChangeLog:

2018-06-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

Backported from mainline
2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/builtins-1.c: Add dg directive to scan
for vpkudus.

From-SVN: r262160

7 years agore PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least...
Jakub Jelinek [Tue, 26 Jun 2018 11:33:48 +0000 (13:33 +0200)] 
re PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least 5 nested loops)

PR c++/86291
* parser.c (cp_parser_omp_for_loop_init): Change for_block argument
type from vec<tree, va_gc> * to vec<tree, va_gc> *&.

* testsuite/libgomp.c++/pr86291.C: New test.

From-SVN: r262140

7 years agosyscall: remove Ustat
Ian Lance Taylor [Tue, 26 Jun 2018 04:44:49 +0000 (04:44 +0000)] 
syscall: remove Ustat

    glibc 2.28 removes ustat.h and the ustat function entirely, which
    breaks syscall.Ustat.

    Updates golang/go#25990

    Reviewed-on: https://go-review.googlesource.com/120535

From-SVN: r262128

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

From-SVN: r262124

7 years agore PR target/84786 ([miscompilation] vunpcklpd accessing xmm16-22 targeting KNL)
Jakub Jelinek [Mon, 25 Jun 2018 17:55:15 +0000 (19:55 +0200)] 
re PR target/84786 ([miscompilation] vunpcklpd accessing xmm16-22 targeting KNL)

PR target/84786
* config/i386/sse.md (vshift_count): New mode attr.
(<shift_insn><mode>3<mask_name>): Use <vshift_count>N instead of vN
as last operand's constraint for VI2_AVX2_AVX512BW shifts.  Use YvN
instead of vN as last operand's constraint for VI48_AVX2 shifts.

* gcc.target/i386/avx512f-pr84786-3.c: New test.

From-SVN: r262103

7 years agobackport: re PR c++/86210 (Missing -Wnonnull warning for function defined in the...
Jakub Jelinek [Mon, 25 Jun 2018 17:54:30 +0000 (19:54 +0200)] 
backport: re PR c++/86210 (Missing -Wnonnull warning for function defined in the same TU)

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

PR c++/86210
* c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
comment.

* g++.dg/warn/Wnonnull4.C: New test.

From-SVN: r262102

7 years agobackport: re PR tree-optimization/86231 (vrp_meet causes wrong-code)
Jakub Jelinek [Mon, 25 Jun 2018 17:53:50 +0000 (19:53 +0200)] 
backport: re PR tree-optimization/86231 (vrp_meet causes wrong-code)

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

PR tree-optimization/86231
* tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
anti-range don't overwrite *vr0min before using it to compute *vr0max.

* gcc.dg/tree-ssa/vrp119.c: New test.
* gcc.c-torture/execute/pr86231.c: New test.

From-SVN: r262101

7 years agobackport: re PR middle-end/85878 (ICE in convert_mode_scalar, at expr.c:287)
Jakub Jelinek [Mon, 25 Jun 2018 17:53:06 +0000 (19:53 +0200)] 
backport: re PR middle-end/85878 (ICE in convert_mode_scalar, at expr.c:287)

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

PR middle-end/85878
* expr.c (expand_assignment): Only call store_expr for halves if the
mode is the same.

* gfortran.fortran-torture/compile/pr85878.f90: New test.

From-SVN: r262100

7 years agobackport: re PR target/85945 (ICE in resolve_subreg_use, at lower-subreg.c:751)
Jakub Jelinek [Mon, 25 Jun 2018 17:52:28 +0000 (19:52 +0200)] 
backport: re PR target/85945 (ICE in resolve_subreg_use, at lower-subreg.c:751)

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

PR target/85945
* lower-subreg.c (find_decomposable_subregs): Don't decompose float
subregs of multi-word pseudos unless the float mode has word size.

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

From-SVN: r262099

7 years agobackport: re PR c++/85659 (ICE with inline assembly inside virtual function)
Jakub Jelinek [Mon, 25 Jun 2018 17:51:44 +0000 (19:51 +0200)] 
backport: re PR c++/85659 (ICE with inline assembly inside virtual function)

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

PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable.  Don't force op into register if it has
BLKmode.

* g++.dg/ext/asm14.C: New test.
* g++.dg/ext/asm15.C: New test.
* g++.dg/ext/asm16.C: New test.

From-SVN: r262098

7 years agobackport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error...
Jakub Jelinek [Mon, 25 Jun 2018 17:48:47 +0000 (19:48 +0200)] 
backport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int')

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

PR rtl-optimization/85431
* dse.c (record_store): Ignore zero width stores.

From-SVN: r262097

7 years agobackport: re PR rtl-optimization/85300 (ICE in exact_int_to_float_conversion_p, at...
Jakub Jelinek [Mon, 25 Jun 2018 17:47:56 +0000 (19:47 +0200)] 
backport: re PR rtl-optimization/85300 (ICE in exact_int_to_float_conversion_p, at simplify-rtx.c:895)

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

PR rtl-optimization/85300
* combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
simplify_unary_operation fails.

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

From-SVN: r262096

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