platform/upstream/gcc.git
5 years agoDaily bump.
GCC Administrator [Thu, 14 Feb 2019 00:16:38 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r268859

5 years agoPR libstdc++/89345 Only define std::destroying_delete for C++2a
Jonathan Wakely [Wed, 13 Feb 2019 22:13:45 +0000 (22:13 +0000)]
PR libstdc++/89345 Only define std::destroying_delete for C++2a

Clang defines the __cpp_impl_destroying_delete macro unconditionally, so
that the feature is supported whenever the library type is defined. This
is incompatible with the current definition in libstdc++ because we use
constexpr and inline variables, which will give an error for older -std
modes.

This patch defines the destroying_delete_t type and destroying_delete
variable independently of the __cpp_impl_destroying_delete macro, but
only for C++2a (because the names aren't reserved for previous
standards). The __cpp_lib_destroying_delete macro is only defined when
both the library type and compiler macro are defined (i.e. when the type
can actually be used as intended).

PR libstdc++/89345
* include/std/version [__cpp_impl_destroying_delete]
(__cpp_lib_destroying_delete): Only define for C++2a and later.
* libsupc++/new [__cpp_impl_destroying_delete]
(__cpp_lib_destroying_delete): Likewise.
(destroying_delete_t, destroying_delete): Likewise, but define even
when __cpp_impl_destroying_delete is not defined.
* testsuite/18_support/destroying_delete.cc: New test.

From-SVN: r268856

5 years agosse.md (vec_set<VI4F_256_512:mode>_0): Use nonimmediate_operand as operand 2 predicate.
Uros Bizjak [Wed, 13 Feb 2019 21:51:41 +0000 (22:51 +0100)]
sse.md (vec_set<VI4F_256_512:mode>_0): Use nonimmediate_operand as operand 2 predicate.

* config/i386/sse.md (vec_set<VI4F_256_512:mode>_0): Use
nonimmediate_operand as operand 2 predicate.
(vec_set<VF2_512_256:mode>_0): Ditto.
(vec_set<VI8_AVX_AVX512F:mode>_0): Ditto.
(*vec_concatv2si): Remove alternative 2.
(*vec_concatv4si_0): Use vm constraint for alternative 0.
(*vec_concatv4si_0): Remove preferred_for_speed attribute.
(vec_concatv2di): Split alternatives 4,5,6 to ...
(*vec_concatv2di_0) ... new pattern.

testsuite/ChangeLog:

* gcc.target/i386/sse2-init-v2di-2.c (dg-final): Update scan string.

From-SVN: r268855

5 years agoPR c++/89297 - ICE with OVERLOAD in template.
Marek Polacek [Wed, 13 Feb 2019 21:39:18 +0000 (21:39 +0000)]
PR c++/89297 - ICE with OVERLOAD in template.

* semantics.c (finish_compound_literal): Call
instantiate_non_dependent_expr_sfinae.

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

From-SVN: r268854

5 years ago[PR86379] do not use TREE_TYPE for USING_DECL_SCOPE
Alexandre Oliva [Wed, 13 Feb 2019 19:08:52 +0000 (19:08 +0000)]
[PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

It's too risky to reuse the type field for USING_DECL_SCOPE.
Language-independent parts of the compiler, such as location and
non-lvalue wrappers, happily take the TREE_TYPE of a USING_DECL as if
it was a type rather than an unrelated scope.

For better or worse, USING_DECLs use the non-common struct so we can
use the otherwise unused result field.  Adjust fallout, from uses of
TREE_TYPE that were supposed to be USING_DECL_SCOPE, to other
accidental uses of TREE_TYPE of a USING_DECL.

for  gcc/cp/ChangeLog

PR c++/86379
* cp-tree.h (USING_DECL_SCOPE): Use result rather than type.
* name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE.
* search.c (protected_accessible_p): Follow USING_DECL_DECLS.
(shared_member_p): Likewise.
(lookup_member): Likewise.
* decl.c (grok_special_member_properties): Skip USING_DECLs.
* semantics.c (finish_omp_declare_simd_methods): Likewise.
(finish_qualified_id_expr): Do not call shared_member_p with
a dependent expr.

for  gcc/testsuite/ChangeLog

PR c++/86379
* g++.dg/cpp0x/pr86379.C: New.

From-SVN: r268851

5 years ago[PR87322] move cp_evaluated up to tsubst all lambda parms
Alexandre Oliva [Wed, 13 Feb 2019 17:42:39 +0000 (17:42 +0000)]
[PR87322] move cp_evaluated up to tsubst all lambda parms

A lambda capture variable initialized with a lambda expr taking more
than one parameter got us confused.

The first problem was that the parameter list was cut short during
tsubsting because we tsubsted it with cp_unevaluated_operand.  We
reset it right after, to tsubst the function body, so I've moved the
reset up so that it's in effect while processing the parameters as
well.

The second problem was that the lambda expr appeared twice, once in a
decltype that gave the capture variable its type, and once in its
initializer.  This caused us to instantiate two separate lambda exprs
and closure types, and then to flag that the lambda expr in the
initializer could not be converted to the unrelated closure type
determined for the capture variable.  Recording the tsubsted expr in
the local specialization map, and retrieving it for reuse fixed it.
However, that required some care to avoid reusing the lambda expr
across different indices in pack expansions.

for  gcc/cp/ChangeLog

PR c++/87322
* pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting.
Move cp_evaluated resetting before signature tsubsting.
(gen_elem_of_pack_expansion_instantiation): Separate local
specializations per index.

for  gcc/testsuite/ChangeLog

PR c++/87322
* g++.dg/cpp1y/pr87322.C: New.
* g++.dg/cpp0x/lambda/lambda-variadic5.C: Test that we
instantiate the expected number of lambda functions.

From-SVN: r268850

5 years agore PR c++/77304 (ICE on C++ code with invalid template parameter: in gimplify_expr...
Marek Polacek [Wed, 13 Feb 2019 16:35:44 +0000 (16:35 +0000)]
re PR c++/77304 (ICE on C++ code with invalid template parameter: in gimplify_expr, at gimplify.c:11260)

PR c++/77304
* g++.dg/cpp2a/nontype-class13.C: New test.

From-SVN: r268849

5 years ago[ARM] Fix Thumb-1 ldm (PR89190)
Wilco Dijkstra [Wed, 13 Feb 2019 16:22:25 +0000 (16:22 +0000)]
[ARM] Fix Thumb-1 ldm (PR89190)

This patch fixes an ICE in the Thumb-1 LDM peepholer.  Thumb-1 LDMs
always update the base register except if the base is loaded.
The current implementation rejects LDMs where the base is not dead,
however this doesn't exclude the case where the base is loaded as
well as dead.  Fix this by explicitly checking whether the base is
loaded.  Also enable LDMs which load the first register.

    gcc/
PR target/89190
* config/arm/arm.c (ldm_stm_operation_p) Set
addr_reg_in_reglist correctly for first register.
(load_multiple_sequence): Remove dead base check.
(gen_ldm_seq): Correctly set write_back for Thumb-1.

    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

From-SVN: r268848

5 years agoC++ concepts: fix ICE with requires on dtors (PR c++/89036)
David Malcolm [Wed, 13 Feb 2019 15:48:37 +0000 (15:48 +0000)]
C++ concepts: fix ICE with requires on dtors (PR c++/89036)

PR c++/89036 reports an ICE due to this assertion failing

1136   /* A class should never have more than one destructor.  */
1137   gcc_assert (!current_fns || via_using || !DECL_DESTRUCTOR_P (method));

on this template with a pair of dtors, with
mutually exclusive "requires" clauses:

template<typename T>
struct Y {
    ~Y() requires(true) = default;
    ~Y() requires(false) {}
};

Nathan introduced this assertion as part of:

  ca9219bf18c68a001d62ecb981bc9176b0feaf12 (aka r251340):
    2017-08-24  Nathan Sidwell  <nathan@acm.org>
       Conversion operators kept on single overload set

which, amongst other changes to add_method had this:
     /* A class should never have more than one destructor.  */
  -  if (current_fns && DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method))
  -    return false;
  +  gcc_assert (!current_fns || !DECL_DESTRUCTOR_P (method));

The following patch drops the assertion (I already had to generalize
the assertion in r268041 to fix PR c++/88699).

gcc/cp/ChangeLog:
PR c++/89036
* class.c (add_method): Drop destructor assertion.

gcc/testsuite/ChangeLog:
PR c++/89036
* g++.dg/concepts/pr89036.C: New test.

From-SVN: r268847

5 years agoAArch64: Allow any offset for SVE addressing modes before reload.
Tamar Christina [Wed, 13 Feb 2019 14:04:41 +0000 (14:04 +0000)]
AArch64: Allow any offset for SVE addressing modes before reload.

On AArch64 aarch64_classify_address has a case for when it's non-strict
that will allow it to accept any byte offset from a reg when validating
an address in a given addressing mode.

This because reload would later make the address valid. SVE however requires
the address always be valid, but currently allows any address when a MEM +
offset is used.  This causes an ICE as nothing later forces the address to be
legitimate.

The patch forces aarch64_emit_sve_pred_move via expand_insn to ensure that
the addressing mode is valid for any loads/stores it creates, which follows
the SVE way of handling address classifications.

gcc/ChangeLog:

PR target/88847
* config/aarch64/aarch64-sve.md (*pred_mov<mode>, pred_mov<mode>):
Expose as @aarch64_pred_mov.
* config/aarch64/aarch64.c (aarch64_classify_address):
Use expand_insn which legitimizes operands.

gcc/testsuite/ChangeLog:

PR target/88847
* gcc.target/aarch64/sve/pr88847.c: New test.

From-SVN: r268845

5 years agoClean up MPX-related stuff.
Martin Liska [Wed, 13 Feb 2019 13:49:34 +0000 (14:49 +0100)]
Clean up MPX-related stuff.

2019-02-13  Martin Liska  <mliska@suse.cz>

* builtins.h (expand_builtin_with_bounds): Remove declaration.
* calls.c (struct arg_data): Remove special_slot, pointer_arg
and pointer_offset fields.
(initialize_argument_information): Remove usage of dead
fields.
* cgraph.h (struct cgraph_thunk_info): Remove
add_pointer_bounds_args.
* cgraphunit.c (cgraph_node::expand_thunk): Remove usage of dead
fields.
(cgraph_node::assemble_thunks_and_aliases): Remove usage of dead
fields.
* config/i386/i386.c (ix86_function_arg_advance): Remove
unrelated comment.
(struct builtin_isa): Remove leaf_p and nothrow_p fields.
(def_builtin):  Remove usage of dead
fields.
(ix86_add_new_builtins): Likewise.
* ipa-fnsummary.c (compute_fn_summary): Likewise.
* ipa-icf.c (sem_function::equals_wpa): Likewise.
(sem_function::init): Likewise.
(sem_variable::merge): Likewise.
* ipa-visibility.c (function_and_variable_visibility): Likewise.
* ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
* lto-cgraph.c (lto_output_node): Likewise.
(lto_output_varpool_node): Likewise.
(input_node): Likewise.
(input_varpool_node): Likewise.
* lto-streamer-out.c (lto_output): Likewise.
* tree-inline.c (expand_call_inline): Remove usage of
assign_stmts.
* tree-inline.h (struct copy_body_data): Likewise.
* varpool.c (varpool_node::dump): Likewise.

From-SVN: r268844

5 years ago[multiple changes]
Jakub Jelinek [Wed, 13 Feb 2019 13:32:00 +0000 (14:32 +0100)]
[multiple changes]

2019-02-13  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/89303
* tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
into pt->vars_contains_escaped_heap instead of setting
pt->vars_contains_escaped_heap to it.

2019-02-13  Jonathan Wakely  <jwakely@redhat.com>
    Jakub Jelinek  <jakub@redhat.com>

PR middle-end/89303
* g++.dg/torture/pr89303.C: New test.

From-SVN: r268843

5 years agoFix -fdec simplification (PR fortran/88649).
Martin Liska [Wed, 13 Feb 2019 13:04:56 +0000 (14:04 +0100)]
Fix -fdec simplification (PR fortran/88649).

2019-02-13  Martin Liska  <mliska@suse.cz>

PR fortran/88649
* resolve.c (resolve_operator): Initialize 't' right
after function entry.  Skip switch (e->value.op.op)
for -fdec operands that become function calls.

From-SVN: r268842

5 years agore PR middle-end/89281 (gcc/optabs.c:3901:30: runtime error: shift exponent 32 is...
Jakub Jelinek [Wed, 13 Feb 2019 12:12:09 +0000 (13:12 +0100)]
re PR middle-end/89281 (gcc/optabs.c:3901:30: runtime error: shift exponent 32 is too large for 32-bit type 'int')

PR middle-end/89281
* optabs.c (prepare_cmp_insn): Use UINTVAL (size) instead of
INTVAL (size), compare it to GET_MODE_MASK instead of
1 << GET_MODE_BITSIZE.

From-SVN: r268841

5 years agore PR c++/88986 (ICE: tree check: expected tree that contains 'decl minimal' structur...
Paolo Carlini [Wed, 13 Feb 2019 10:34:49 +0000 (10:34 +0000)]
re PR c++/88986 (ICE: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in member_vec_binary_search, at cp/name-lookup.c:1136)

/cp
2019-02-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/88986
* decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as
context (the first argument).
* pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION
as context.

/testsuite
2019-02-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/88986
* g++.dg/cpp1z/using4.C: New.
* g++.dg/cpp1z/using5.C: Likewise.
* g++.dg/cpp1z/using6.C: Likewise.

From-SVN: r268839

5 years agore PR target/89290 (ICE in change_address_1, at emit-rtl.c:2286)
Jakub Jelinek [Wed, 13 Feb 2019 08:45:37 +0000 (09:45 +0100)]
re PR target/89290 (ICE in change_address_1, at emit-rtl.c:2286)

PR target/89290
* config/i386/predicates.md (x86_64_immediate_operand): Allow
TLS UNSPECs offsetted by signed 32-bit CONST_INT even with
-mcmodel=large.

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

From-SVN: r268837

5 years agolibphobos: Fallback on UnwindBacktrace if LibBacktrace not defined.
Iain Buclaw [Wed, 13 Feb 2019 07:14:46 +0000 (07:14 +0000)]
libphobos: Fallback on UnwindBacktrace if LibBacktrace not defined.

In the gcc.backtrace module, either one of LibBacktrace or
UnwindBacktrace will always be defined.  Giving UnwindBacktrace a higher
precedence over the libc backtrace as the default handler because the
latter depends on a rt.backtrace module that is not compiled in.

libphobos/ChangeLog:

* libdruntime/core/runtime.d (defaultTraceHandler): Give
UnwindBacktrace handler precedence over backtrace.

From-SVN: r268836

5 years agoRemove a barrier when EDGE_CROSSING is removed (PR lto/88858).
Martin Liska [Wed, 13 Feb 2019 06:57:38 +0000 (07:57 +0100)]
Remove a barrier when EDGE_CROSSING is removed (PR lto/88858).

2019-02-13  Martin Liska  <mliska@suse.cz>

PR lto/88858
* cfgrtl.c (remove_barriers_from_footer): New function.
(try_redirect_by_replacing_jump): Use it.
(cfg_layout_redirect_edge_and_branch): Likewise.

From-SVN: r268835

5 years agors6000: Add support for the vec_sbox_be, vec_cipher_be etc. builtins.
Xiong Hu Luo [Wed, 13 Feb 2019 06:31:01 +0000 (06:31 +0000)]
rs6000: Add support for the vec_sbox_be, vec_cipher_be etc. builtins.

The 5 new builtins vec_sbox_be, vec_cipher_be, vec_cipherlast_be, vec_ncipher_be
and vec_ncipherlast_be only support vector unsigned char type parameters.
Add new instruction crypto_vsbox_<mode> and crypto_<CR_insn>_<mode> to handle
them accordingly, where the new mode CR_vqdi can be expanded to vector unsigned
long long for none _be postfix builtins or vector unsigned char for _be postfix
builtins.

gcc/ChangeLog

2019-02-13  Xiong Hu Luo  <luoxhu@linux.vnet.ibm.com>

* config/rs6000/altivec.h (vec_sbox_be, vec_cipher_be,
vec_cipherlast_be, vec_ncipher_be, vec_ncipherlast_be): New #defines.
* config/rs6000/crypto.md (CR_vqdi): New define_mode_iterator.
(crypto_vsbox_<mode>, crypto_<CR_insn>_<mode>): New define_insns.
* config/rs6000/rs6000-builtin.def (VSBOX_BE): New BU_CRYPTO_1.
(VCIPHER_BE, VCIPHERLAST_BE, VNCIPHER_BE, VNCIPHERLAST_BE):
New BU_CRYPTO_2.
* config/rs6000/rs6000.c (builtin_function_type)
<CRYPTO_BUILTIN_VSBOX_BE, CRYPTO_BUILTIN_VCIPHER_BE,
CRYPTO_BUILTIN_VCIPHERLAST_BE, CRYPTO_BUILTIN_VNCIPHER_BE,
CRYPTO_BUILTIN_VNCIPHERLAST_BE>: New switch options.
* doc/extend.texi (vec_sbox_be, vec_cipher_be, vec_cipherlast_be,
vec_ncipher_be, vec_ncipherlast_be): New builtin functions.

gcc/testsuite/ChangeLog

2019-02-13  Xiong Hu Luo  <luoxhu@linux.vnet.ibm.com>

* gcc.target/powerpc/crypto-builtin-1.c
(crypto1_be, crypto2_be, crypto3_be, crypto4_be, crypto5_be):
New testcases.

From-SVN: r268834

5 years agoDaily bump.
GCC Administrator [Wed, 13 Feb 2019 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r268833

5 years agore PR go/89193 ("make distclean" leaves stuff in gotools/)
Ian Lance Taylor [Wed, 13 Feb 2019 00:10:06 +0000 (00:10 +0000)]
re PR go/89193 ("make distclean" leaves stuff in gotools/)

PR go/89193
* Makefile.am (mostlyclean-local): Avoid getting an error from
chmod.  Remove check-vet-dir and gocache-test.
* Makefile.in: Regenerate.

From-SVN: r268830

5 years agoinvoke.texi (RS/6000 and PowerPC Options): Remove duplicate -maltivec.
Pat Haugen [Tue, 12 Feb 2019 22:03:00 +0000 (22:03 +0000)]
invoke.texi (RS/6000 and PowerPC Options): Remove duplicate -maltivec.

* doc/invoke.texi (RS/6000 and PowerPC Options): Remove duplicate
-maltivec. Delete -maltivec=be and -maltivec=le documentation.

From-SVN: r268829

5 years agosyscall: don't assume that WIFCONTINUED is defined
Ian Lance Taylor [Tue, 12 Feb 2019 21:29:52 +0000 (21:29 +0000)]
syscall: don't assume that WIFCONTINUED is defined

    It's not defined on the Hurd.

    Reviewed-on: https://go-review.googlesource.com/c/161963

From-SVN: r268828

5 years agoPR c++/89144 - link error with constexpr initializer_list.
Jason Merrill [Tue, 12 Feb 2019 21:18:51 +0000 (16:18 -0500)]
PR c++/89144 - link error with constexpr initializer_list.

In this PR, we were unnecessarily rejecting a constexpr initializer_list
with no elements.  This seems like a fairly useless degenerate case, but it
makes sense to avoid allocating an underlying array at all if there are no
elements and instead use a null pointer, like the initializer_list default
constructor.

If the (automatic storage duration) list does have initializer elements, we
continue to reject the declaration, because the initializer_list ends up
referring to an automatic storage duration temporary array, which is not a
suitable constant initializer.  If we make it static, it should be OK
because we refer to a static array.  The second hunk fixes that case.  It
also means we won't diagnose some real errors in templates, but those
diagnostics aren't required, and we'll get them when the template is
instantiated.

* call.c (convert_like_real) [ck_list]: Don't allocate a temporary
array for an empty list.
* typeck2.c (store_init_value): Don't use cxx_constant_init in a
template.

From-SVN: r268827

5 years agoi386: Revert revision 268678 and revision 268657
H.J. Lu [Tue, 12 Feb 2019 19:00:35 +0000 (19:00 +0000)]
i386: Revert revision 268678 and revision 268657

i386 backend has

INT_MODE (OI, 32);
INT_MODE (XI, 64);

So, XI_MODE represents 64 INTEGER bytes = 64 * 8 = 512 bit operation,
in case of const_1, all 512 bits set.

We can load zeros with narrower instruction, (e.g. 256 bit by inherent
zeroing of highpart in case of 128 bit xor), so TImode in this case.

Some targets prefer V4SF mode, so they will emit float xorps for zeroing

Then the introduction of AVX512F fubared everything by overloading the
meaning of insn mode.

How should we use INSN mode,  MODE_XI, in standard_sse_constant_opcode
and patterns which use standard_sse_constant_opcode? 2 options:

1.  MODE_XI should only used to check if EXT_REX_SSE_REG_P is true
in any register operand.  The operand size must be determined by operand
itself , not by MODE_XI.  The operand encoding size should be determined
by the operand size, EXT_REX_SSE_REG_P and AVX512VL.
2. MODE_XI should be used to determine the operand encoding size.
EXT_REX_SSE_REG_P and AVX512VL should be checked for encoding
instructions.

gcc/

PR target/89229
* config/i386/i386.md (*movoi_internal_avx): Revert revision
268678 and revision 268657.
(*movti_internal): Likewise.

gcc/testsuite/

PR target/89229
* gcc.target/i386/pr89229-1.c: New test.

From-SVN: r268811

5 years agolibphobos: Merge upstream phobos 791c5d240
Iain Buclaw [Tue, 12 Feb 2019 18:28:04 +0000 (18:28 +0000)]
libphobos: Merge upstream phobos 791c5d240

Adds missing HPPA support in std.experimental.allocator.

Reviewed-on: https://github.com/dlang/phobos/pull/6838

From-SVN: r268810

5 years agoS/390: Reject invalid Q/R/S/T addresses after LRA
Ilya Leoshkevich [Tue, 12 Feb 2019 14:51:39 +0000 (14:51 +0000)]
S/390: Reject invalid Q/R/S/T addresses after LRA

The following insn:

(insn (set (reg:DI %r2)
           (sign_extend:DI (mem:SI
            (const:DI (plus:DI (symbol_ref:DI ("*.LC0"))
                               (const_int 16)))))))

is correctly recognized by LRA as RIL alternative of extendsidi2
define_insn.  However, when recognition runs after LRA, it returns RXY
alternative, which is incorrect, since the offset 16 points past the
end of of *.LC0 literal pool entry.  Such addresses are normally
rejected by s390_decompose_address ().

This inconsistency confuses annotate_constant_pool_refs: the selected
alternative makes it proceed with annotation, only to find that the
annotated address is invalid, causing ICE.

This patch fixes the root cause, namely, that s390_check_qrst_address ()
behaves differently during and after LRA.

gcc/ChangeLog:

2019-02-12  Ilya Leoshkevich  <iii@linux.ibm.com>

PR target/89233
* config/s390/s390.c (s390_decompose_address): Update comment.
(s390_check_qrst_address): Reject invalid address forms after
LRA.

gcc/testsuite/ChangeLog:

2019-02-12  Ilya Leoshkevich  <iii@linux.ibm.com>

PR target/89233
* gcc.target/s390/pr89233.c: New test.

From-SVN: r268798

5 years agovec-sld-modulo.c: Require p8vector_hw.
Bill Schmidt [Tue, 12 Feb 2019 14:24:58 +0000 (14:24 +0000)]
vec-sld-modulo.c: Require p8vector_hw.

2018-01-12  Bill Schmidt  <wschmidt@linux.ibm.com>

* gcc.target/powerpc/vec-sld-modulo.c: Require p8vector_hw.
* gcc.target/powerpc/vec-srad-modulo.c: Likewise.
* gcc.target/powerpc/vec-srd-modulo.c: Likewise.

From-SVN: r268797

5 years ago[libbacktrace] Handle bsearch with NULL base in dwarf_lookup_pc
Tom de Vries [Tue, 12 Feb 2019 14:00:59 +0000 (14:00 +0000)]
[libbacktrace] Handle bsearch with NULL base in dwarf_lookup_pc

The call to bsearch in dwarf_lookup_pc can have NULL as base argument when
the nmemb argument is 0.  The base argument is required to be pointing to the
initial member of an array of nmemb objects.  It is not specified what
constitutes a valid pointer to an array of 0 objects, but glibc declares base
with attribute non-null, so the NULL will trigger a sanitizer runtime error.

Fix this by only calling bsearch if nmemb != 0.

2019-02-12  Tom de Vries  <tdevries@suse.de>

PR libbacktrace/81983
* dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.

From-SVN: r268796

5 years agoRevert a hunk from r261322 (PR lto/88876).
Martin Liska [Tue, 12 Feb 2019 13:46:41 +0000 (14:46 +0100)]
Revert a hunk from r261322 (PR lto/88876).

2019-02-12  Martin Liska  <mliska@suse.cz>

PR lto/88876
* ipa-pure-const.c (propagate_pure_const): Revert hunk as
we need default values of funct_state for a function that
is not optimized.

From-SVN: r268795

5 years agoFix splay tree KEY leak detected in GDB test gdb.base/macscp.exp
Philippe Waroquiers [Tue, 12 Feb 2019 13:02:48 +0000 (14:02 +0100)]
Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp

When a node is removed from a splay tree, the splay tree was
not using the function splay_tree_delete_key_fn to release the key.
This was causing a leak, fixed by Tom Tromey.

This patch fixes another key leak, that happens when a key equal to
a key already present is inserted.  In such a case, we have to release
the old KEY.
Note that this is based on the assumption that the caller always
allocates a new KEY when doing an insert.

Also, clarify the documentation about when the release functions are
called.

2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* splay-tree.h (splay_tree_delete_key_fn): Update comment.
(splay_tree_delete_value_fn): Likewise.

libiberty/ChangeLog
2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* splay-tree.c (splay_tree_insert): Also release old KEY in case
of insertion of a key equal to an already present key.
(splay_tree_new_typed_alloc): Update comment.

From-SVN: r268793

5 years agoasan.c (asan_expand_mark_ifn): Take into account the alignment of the object to pick...
Eric Botcazou [Tue, 12 Feb 2019 12:23:08 +0000 (12:23 +0000)]
asan.c (asan_expand_mark_ifn): Take into account the alignment of the object to pick the size of stores on...

* asan.c (asan_expand_mark_ifn): Take into account the alignment of
the object to pick the size of stores on strict-alignment platforms.

* config/sparc/sparc.md (*movsi_insn): Minor tweak.
(*movdi_insn_sp32): Likewise.
(*movdi_insn_sp64): Likewise.

From-SVN: r268792

5 years agore PR target/88777 (Out-of-range offsets building glibc test-tgmath2.c for hppa-linux...
Jan Hubicka [Tue, 12 Feb 2019 11:25:11 +0000 (12:25 +0100)]
re PR target/88777 (Out-of-range offsets building glibc test-tgmath2.c for hppa-linux-gnu)

PR lto/88777
* cgraphunit.c (analyze_functions): Clear READONLY flag for external
types that needs constructiong.
* tree.h (may_be_aliased): Do not check TYPE_NEEDS_CONSTRUCTING.

From-SVN: r268791

5 years agore PR tree-optimization/89253 (ICE in split_loop, at tree-ssa-loop-split.c:566)
Richard Biener [Tue, 12 Feb 2019 09:29:39 +0000 (09:29 +0000)]
re PR tree-optimization/89253 (ICE in split_loop, at tree-ssa-loop-split.c:566)

2019-02-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89253
* tree-ssa-loop-split.c (tree_ssa_split_loops): Check we can
duplicate the loop.

* gfortran.dg/pr89253.f: New testcase.

From-SVN: r268790

5 years agolinemap_line_start: protect against location_t overflow (PR lto/88147)
David Malcolm [Tue, 12 Feb 2019 01:09:31 +0000 (01:09 +0000)]
linemap_line_start: protect against location_t overflow (PR lto/88147)

PR lto/88147 reports an assertion failure due to a bogus location_t value
when adding a line to a pre-existing line map, when there's a large
difference between the two line numbers.

For some "large differences", this leads to a location_t value that exceeds
LINE_MAP_MAX_LOCATION, in which case linemap_line_start returns 0.  This
isn't ideal, but at least should lead to safe degradation of location
information.

However, if the difference is very large, it's possible for the line
number offset (relative to the start of the map) to be sufficiently large
that overflow occurs when left-shifted by the column-bits, and hence
the check against the LINE_MAP_MAX_LOCATION limit fails, leading to
a seemingly-valid location_t value, but encoding the wrong location.  This
triggers the assertion failure:
  linemap_assert (SOURCE_LINE (map, r) == to_line);

The fix (thanks to Martin) is to check for overflow when determining
whether to reuse an existing map, and to not reuse it if it would occur.

gcc/ChangeLog: David Malcolm  <dmalcolm@redhat.com>
PR lto/88147
* input.c (selftest::test_line_offset_overflow): New selftest.
(selftest::input_c_tests): Call it.

libcpp/ChangeLog: Martin Liska  <mliska@suse.cz>
PR lto/88147
* line-map.c (linemap_line_start): Don't reuse the existing line
map if the line offset is sufficiently large to cause overflow
when computing location_t values.

From-SVN: r268789

5 years agoDaily bump.
GCC Administrator [Tue, 12 Feb 2019 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r268788

5 years agomksysinfo: remove incorrect quotes in st_fsid handling for Hurd
Ian Lance Taylor [Tue, 12 Feb 2019 00:15:34 +0000 (00:15 +0000)]
mksysinfo: remove incorrect quotes in st_fsid handling for Hurd

    Also stop converting st_dev on Hurd; it shouldn't appear, but if it
    somehow does we don't want to convert it.

    Reviewed-on: https://go-review.googlesource.com/c/161961

From-SVN: r268785

5 years agoPR c++/89241 - ICE with __func__ in lambda in template.
Jason Merrill [Mon, 11 Feb 2019 23:05:16 +0000 (18:05 -0500)]
PR c++/89241 - ICE with __func__ in lambda in template.

When we're instantiating a generic lambda, its enclosing context will
have already been instantiated, so we need to look for that as well.

* pt.c (enclosing_instantiation_of): Also check
instantiated_lambda_fn_p for the template context.

From-SVN: r268784

5 years agoPR c++/89212 - ICE converting nullptr to pointer-to-member-function.
Marek Polacek [Mon, 11 Feb 2019 20:03:43 +0000 (20:03 +0000)]
PR c++/89212 - ICE converting nullptr to pointer-to-member-function.

* pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for
null member pointer value.

* g++.dg/cpp0x/nullptr40.C: New test.
* g++.dg/cpp0x/nullptr41.C: New test.

From-SVN: r268781

5 years agore PR c++/88977 (__builtin_is_constant_evaluated() as function template argument...
Jakub Jelinek [Mon, 11 Feb 2019 20:00:16 +0000 (21:00 +0100)]
re PR c++/88977 (__builtin_is_constant_evaluated() as function template argument causes substitution failure)

PR c++/88977
* pt.c (convert_nontype_argument): Pass true as manifestly_const_eval
to maybe_constant_value calls.

* g++.dg/cpp2a/is-constant-evaluated7.C: New test.

From-SVN: r268780

5 years ago* typeck2.c (digest_init_r): Remove commented code.
Marek Polacek [Mon, 11 Feb 2019 19:46:54 +0000 (19:46 +0000)]
* typeck2.c (digest_init_r): Remove commented code.

From-SVN: r268779

5 years ago* fi.po, fr.po: Update.
Joseph Myers [Mon, 11 Feb 2019 19:05:33 +0000 (19:05 +0000)]
* fi.po, fr.po: Update.

From-SVN: r268778

5 years ago[COMMITTED] Fix pthread errors in pr86637-2.c
Wilco Dijkstra [Mon, 11 Feb 2019 18:14:37 +0000 (18:14 +0000)]
[COMMITTED] Fix pthread errors in pr86637-2.c

Fix test errors on targets which do not support pthreads.

Committed as obvious.

    testsuite/
PR tree-optimization/86637
* gcc.c-torture/compile/pr86637-2.c: Test pthread and graphite target.

From-SVN: r268777

5 years agoPR tree-optimization/88771 - Misleading -Werror=array-bounds error
Martin Sebor [Mon, 11 Feb 2019 17:44:05 +0000 (17:44 +0000)]
PR tree-optimization/88771 - Misleading -Werror=array-bounds error

gcc/ChangeLog:

PR tree-optimization/88771
* gimple-ssa-warn-restrict.c (pass_wrestrict::gate): Also enable
when -Wstringop-overflow is set.
(builtin_memref::builtin_memref): Adjust excessive upper bound
only when lower bound is not excessive.
(maybe_diag_overlap): Detect and diagnose excessive bounds via
-Wstringop-ovefflow.
(maybe_diag_offset_bounds): Rename...
(maybe_diag_access_bounds): ...to this.
(check_bounds_or_overlap): Adjust for name change above.

gcc/testsuite/ChangeLog:

PR tree-optimization/88771
* gcc.dg/Wstringop-overflow-8.c: New test.
* gcc.dg/Wstringop-overflow-9.c: New test.
* gcc.dg/Warray-bounds-40.c: New test.
* gcc.dg/builtin-stpncpy.c: Adjust.
* gcc.dg/builtin-stringop-chk-4.c: Adjust.
* g++.dg/opt/memcpy1.C: Adjust.

From-SVN: r268775

5 years agoPR c++/87996 - size of array is negative error when SIZE_MAX/2 < sizeof(array) <...
Martin Sebor [Mon, 11 Feb 2019 17:35:17 +0000 (17:35 +0000)]
PR c++/87996 - size of array is negative error when SIZE_MAX/2 < sizeof(array) <= SIZE_MAX

gcc/ChangeLog:

PR c++/87996
* builtins.c (max_object_size): Move from here...
* builtins.h (max_object_size): ...and here...
* tree.c (max_object_size): ...to here...
* tree.h (max_object_size): ...and here.

gcc/c-family/ChangeLog:

PR c++/87996
* c-common.c (invalid_array_size_error): New function.
(valid_array_size_p): Call it.  Handle size as well as type.
* c-common.h (valid_constant_size_p): New function.
(enum cst_size_error): New type.

gcc/cp/ChangeLog:

PR c++/87996
* decl.c (compute_array_index_type_loc): Preserve signed sizes
for diagnostics.  Call valid_array_size_p instead of error.
* init.c (build_new_1): Compute size for diagnostic.  Call
invalid_array_size_error
(build_new): Call valid_array_size_p instead of error.

gcc/testsuite/ChangeLog:

PR c++/87996
* c-c++-common/array-5.c: New test.
* c-c++-common/pr68107.c: Adjust text of diagnostics.
* g++.dg/init/new38.C: Same.
* g++.dg/init/new43.C: Same.
* g++.dg/init/new44.C: Same.
* g++.dg/init/new46.C: Same.
* g++.dg/other/large-size-array.C: Same.
* g++.dg/other/new-size-type.C: Same.
* g++.dg/template/array30.C: Same.
* g++.dg/template/array32.C: New test.
* g++.dg/template/dependent-name3.C: Adjust.
* gcc.dg/large-size-array-3.c: Same.
* gcc.dg/large-size-array-5.c: Same.
* gcc.dg/large-size-array.c: Same.
* g++.old-deja/g++.brendan/array1.C: Same.
* g++.old-deja/g++.mike/p6149.C: Same.

From-SVN: r268774

5 years agoinliner-1.c: Correct comments.
Martin Sebor [Mon, 11 Feb 2019 17:07:41 +0000 (17:07 +0000)]
inliner-1.c: Correct comments.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-prof/inliner-1.c: Correct comments.

From-SVN: r268773

5 years agoArm: Update tests after register allocation changes. (PR/target 88560)
Tamar Christina [Mon, 11 Feb 2019 16:54:18 +0000 (16:54 +0000)]
Arm: Update tests after register allocation changes. (PR/target 88560)

After the register allocator changes of r268705 we need to update a few tests
with new output.

In all cases the compiler is now generating the expected code, since the tests
are all float16 testcases using a hard-floar abi, we expect that actual fp16
instructions are used rather than using integer loads and stores.  Because of
we also save on some mov.f16s that were being emitted before to move between
the two.

The aapcs cases now match the f32 cases in using floating point operations.

gcc/testsuite/Changelog

PR middle-end/88560
* gcc.target/arm/armv8_2-fp16-move-1.c: Update assembler scans.
* gcc.target/arm/fp16-aapcs-1.c: Likewise.
* gcc.target/arm/fp16-aapcs-3.c: Likewise.

From-SVN: r268772

5 years agors6000.c (rs6000_gimple_fold_builtin): Shift-right and shift-left vector built-ins...
Bill Schmidt [Mon, 11 Feb 2019 16:50:33 +0000 (16:50 +0000)]
rs6000.c (rs6000_gimple_fold_builtin): Shift-right and shift-left vector built-ins need to include a TRUNC_MOD_EXPR...

[gcc]

2019-02-11  Bill Schmidt  <wschmidt@linux.ibm.com>

* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right
and shift-left vector built-ins need to include a TRUNC_MOD_EXPR
for correct semantics.

[gcc/testsuite]

2019-02-11  Bill Schmidt  <wschmidt@linux.ibm.com>

* gcc.target/powerpc/vec-sld-modulo.c: New.
* gcc.target/powerpc/vec-srad-modulo.c: New.
* gcc.target/powerpc/vec-srd-modulo.c: New.

From-SVN: r268771

5 years ago[RS6000] No inline PLT for V4 bss-plt, implement -mno-pltseq
Alan Modra [Mon, 11 Feb 2019 15:19:59 +0000 (01:49 +1030)]
[RS6000] No inline PLT for V4 bss-plt, implement -mno-pltseq

Inline PLT calls need PLT to be an array of addresses.  PowerPC 32-bit
bss-plt works differently, so this patch disables inline PLT calls
when -mbss-plt.  The patch also adds support for a new -mno-pltseq
option, which may be required when linking with -mbss-plt code.

* doc/invoke.texi (man page RS/6000 and PowerPC Options): Mention
-mlongcall and -mpltseq.
(RS/6000 and PowerPC Options <-mlongcall>): Mention inline PLT calls.
(RS/6000 and PowerPC Options <-mpltseq>): Document.
* config/rs6000/rs6000.h (TARGET_PLTSEQ): Define.
* config/rs6000/sysv4.opt (mpltseq): New option.
* config/rs6000/sysv4.h (TARGET_PLTSEQ): Redefine.
(SUBTARGET_OVERRIDE_OPTIONS): Error if given -mpltseq when assembler
support is lacking.  Don't allow -mpltseq with -mbss-plt.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Warn if
-mpltseq given for ELFv1.
* config/rs6000/rs6000.c (rs6000_call_aix): Comment on UNSPEC_PLTSEQ.
Only use UNSPEC_PLTSEQ for inline PLT calls.
(rs6000_call_sysv, rs6000_sibcall_sysv): Expand comments.  Only
use UNSPEC_PLTSEQ for inline PLT calls.
(rs6000_indirect_call_template_1, rs6000_longcall_ref),
(rs6000_call_aix, rs6000_call_sysv, rs6000_sibcall_sysv): Replace
uses of HAVE_AS_PLTSEQ with TARGET_PLTSEQ, simplifying.
* config/rs6000/rs6000.md (pltseq_tocsave_<mode>),
(pltseq_plt16_ha_<mode>, pltseq_plt16_lo_<mode>),
(pltseq_mtctr_<mode>): Likewise.

From-SVN: r268770

5 years agoPR libstdc++/89023 fix test that fails when <omp.h> not available
Jonathan Wakely [Mon, 11 Feb 2019 12:56:59 +0000 (12:56 +0000)]
PR libstdc++/89023 fix test that fails when <omp.h> not available

Instead of a single test that only checks whether <regex> can be
included in Parallel Mode, add tests for each of C++11/C++14/C++17 that
check whether <bits/extc++.h> is compatible with _GLIBCXX_PARALLEL.
This increases the coverage to (almost) all headers.

If <omp.h> is not available then the tests will trivially pass, because
we don't care about compatibility with _GLIBCXX_PARALLEL in that case.

PR libstdc++/89023
* testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
* testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
* testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
* testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.

From-SVN: r268769

5 years agoRestore .init_array etc. detection on 64-bit Solaris
Rainer Orth [Mon, 11 Feb 2019 12:06:19 +0000 (12:06 +0000)]
Restore .init_array etc. detection on 64-bit Solaris

* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Use 8-byte strings with
Solaris ld.
* configure: Regenerate.

From-SVN: r268768

5 years agoAdd AMD GCN maintainers
Andrew Stubbs [Mon, 11 Feb 2019 11:31:43 +0000 (11:31 +0000)]
Add AMD GCN maintainers

2019-02-11  Andrew Stubbs  <ams@codesourcery.com>

* MAINTAINERS (amdgcn port): Add myself and Julian Brown.
(Write After Approval): Remove myself and Julian.

From-SVN: r268767

5 years agore PR bootstrap/88714 (bootstrap comparison failure on armv7l since r265398)
Jakub Jelinek [Mon, 11 Feb 2019 10:39:59 +0000 (11:39 +0100)]
re PR bootstrap/88714 (bootstrap comparison failure on armv7l since r265398)

PR bootstrap/88714
* config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use q constraint
instead of r.

From-SVN: r268766

5 years agofunction.c (assign_parm_setup_block): Use the stored size...
Hans-Peter Nilsson [Mon, 11 Feb 2019 09:03:51 +0000 (09:03 +0000)]
function.c (assign_parm_setup_block): Use the stored size...

* function.c (assign_parm_setup_block): Use the stored
size, not the passed size, when allocating stack-space,
also for a parameter with alignment larger than
MAX_SUPPORTED_STACK_ALIGNMENT.

From-SVN: r268763

5 years agoConstruct ipa_reduced_postorder always for overwritable (PR ipa/89009).
Martin Liska [Mon, 11 Feb 2019 08:13:03 +0000 (09:13 +0100)]
Construct ipa_reduced_postorder always for overwritable (PR ipa/89009).

2019-02-11  Martin Liska  <mliska@suse.cz>

PR ipa/89009
* ipa-cp.c (build_toporder_info): Remove usage of a param.
* ipa-inline.c (inline_small_functions): Likewise.
* ipa-pure-const.c (propagate_pure_const): Likewise.
(propagate_nothrow): Likewise.
* ipa-reference.c (propagate): Likewise.
* ipa-utils.c (struct searchc_env): Remove unused field.
(searchc): Always search across AVAIL_INTERPOSABLE.
(ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as
the only called IPA pure const can properly not propagate
across interposable boundary.
* ipa-utils.h (ipa_reduced_postorder): Remove param.
2019-02-11  Martin Liska  <mliska@suse.cz>

PR ipa/89009
* g++.dg/ipa/pr89009.C: New test.

From-SVN: r268762

5 years ago[NDS32] Add memory mode in call pattern.
Chung-Ju Wu [Mon, 11 Feb 2019 07:04:00 +0000 (07:04 +0000)]
[NDS32] Add memory mode in call pattern.

gcc/
* config/nds32/nds32.md (call_internal, call_value_internal,
sibcall_internal, sibcall_value_internal): Use SImode for mem rtx.

From-SVN: r268761

5 years agocris.c (cris_preferred_minimum_alignment): Fix name typo.
Hans-Peter Nilsson [Mon, 11 Feb 2019 02:04:02 +0000 (02:04 +0000)]
cris.c (cris_preferred_minimum_alignment): Fix name typo.

* config/cris/cris.c (cris_preferred_minimum_alignment): Fix name
typo.

From-SVN: r268760

5 years agoi386: Fix a typo in comments for for "Yd"
H.J. Lu [Mon, 11 Feb 2019 01:39:54 +0000 (01:39 +0000)]
i386: Fix a typo in comments for for "Yd"

config/i386/constraints.md has

(define_register_constraint "Yd"
 "TARGET_AVX512DQ ? ALL_SSE_REGS : TARGET_SSE4_1 ? SSE_REGS : NO_REGS"
 "@internal Any EVEX encodable SSE register (@code{%xmm0-%xmm31}) for AVX512DQ target or any SSE register for SSE4_1 target.")

Comments for "Yd" should mention AVX512DQ, not AVX512BW.

* config/i386/constraints.md (Yd): Replace AVX512BW with AVX512DQ
in comments

From-SVN: r268759

5 years agoDaily bump.
GCC Administrator [Mon, 11 Feb 2019 00:16:19 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r268758

5 years agolibphobos: Merge upstream druntime 2f764ab6
Iain Buclaw [Sun, 10 Feb 2019 22:10:22 +0000 (22:10 +0000)]
libphobos: Merge upstream druntime 2f764ab6

Fixes hashing of complex reals, enabling testing of rt.util.typeinfo and
core.internal.hash.

Reviewed-on: https://github.com/dlang/druntime/pull/6837

libphobos/ChangeLog:

* Makefile.in: Rebuild.
* configure: Rebuild.
* libdruntime/Makefile.am: Test rt.util.typeinfo and
core.internal.convert.
* libdruntime/Makefile.in: Rebuild.
* src/Makefile.in: Rebuild.
* testsuite/Makefile.in: Rebuild.
* testsuite/libphobos.hash/test_hash.d: Update test.

From-SVN: r268755

5 years agolibphobos: Apply core.internal.hash updates from druntime
Iain Buclaw [Sun, 10 Feb 2019 21:01:24 +0000 (21:01 +0000)]
libphobos: Apply core.internal.hash updates from druntime

Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2469

libphobos/ChangeLog:

* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Remove rt/util/hash.d
* libdruntime/Makefile.in: Rebuild.
* testsuite/libphobos.aa/aa.exp: New file.
* testsuite/libphobos.aa/test_aa.d: New test.
* testsuite/libphobos.hash/hash.exp: New file.
* testsuite/libphobos.hash/test_hash.d: New test.

From-SVN: r268754

5 years agore PR fortran/71723 ([F08] ICE on invalid pointer initialization)
Thomas Koenig [Sun, 10 Feb 2019 15:56:41 +0000 (15:56 +0000)]
re PR fortran/71723 ([F08] ICE on invalid pointer initialization)

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71723
* expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
is_init_expr.

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71723
* gfortran.dg/pointer_init_2.f90: Adjust error messages.
* gfortran.dg/pointer_init_6.f90: Likewise.
* gfortran.dg/pointer_init_9.f90: New test.

From-SVN: r268749

5 years agore PR fortran/71723 ([F08] ICE on invalid pointer initialization)
Thomas Koenig [Sun, 10 Feb 2019 15:52:38 +0000 (15:52 +0000)]
re PR fortran/71723 ([F08] ICE on invalid pointer initialization)

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71237
* expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
is_init_expr.

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71237
* gfortran.dg/pointer_init_2.f90: Adjust error messages.
* gfortran.dg/pointer_init_6.f90: Likewise.
* gfortran.dg/pointer_init_9.f90: New test.

From-SVN: r268748

5 years agore PR fortran/67679 (-Wunitialized reports on compiler-generated variables)
Thomas Koenig [Sun, 10 Feb 2019 15:38:19 +0000 (15:38 +0000)]
re PR fortran/67679 (-Wunitialized reports on compiler-generated variables)

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/67679
    * gfortran.dg/warn_undefined_1.f90: New test.

From-SVN: r268747

5 years agolibphobos: Merge phobos upstream 6c9fb28b0
Iain Buclaw [Sun, 10 Feb 2019 14:27:17 +0000 (14:27 +0000)]
libphobos: Merge phobos upstream 6c9fb28b0

Fixes a thread deadlock that occurs in the test runner if libcurl is
missing.

Library fix for https://gcc.gnu.org/PR88654

Reviewed-on: https://github.com/dlang/phobos/pull/6824

From-SVN: r268746

5 years ago[NDS32] Set default --with-nds32-lib correctly.
Chung-Ju Wu [Sun, 10 Feb 2019 12:27:01 +0000 (12:27 +0000)]
[NDS32] Set default --with-nds32-lib correctly.

gcc/
* config.gcc (with_nds32_lib): Set default --with-nds32-lib correctly.

From-SVN: r268744

5 years agore PR tree-optimization/89268 (r268689 caused FAIL: gcc.dg/vect/pr79887.c)
Jakub Jelinek [Sun, 10 Feb 2019 11:06:58 +0000 (12:06 +0100)]
re PR tree-optimization/89268 (r268689 caused FAIL: gcc.dg/vect/pr79887.c)

PR tree-optimization/89268
* tree-if-conv.c (version_loop_for_if_conversion): Push to preds only
if preds is non-NULL.

* gcc.dg/vect/pr89268.c: New test.

From-SVN: r268743

5 years agore PR lto/89272 (r268728 caused FAIL: g++.dg/lto/pr65316 cp_lto_pr65316_0.o assemble)
Jan Hubicka [Sun, 10 Feb 2019 10:46:43 +0000 (11:46 +0100)]
re PR lto/89272 (r268728 caused FAIL: g++.dg/lto/pr65316 cp_lto_pr65316_0.o assemble)

PR lto/89272
* tree.c (fld_simplified_type_name): Also keep TYPE_DECL for
polymorphic types.

From-SVN: r268742

5 years ago[NDS32] Add 'trap' pattern for __builtin_trap ().
Monk Chiang [Sun, 10 Feb 2019 09:45:55 +0000 (09:45 +0000)]
[NDS32] Add 'trap' pattern for __builtin_trap ().

gcc/
* config/nds32/nds32.md (trap): New pattern.

From-SVN: r268741

5 years agod/dmd: Merge upstream dmd 39edbe17e
Iain Buclaw [Sun, 10 Feb 2019 09:13:26 +0000 (09:13 +0000)]
d/dmd: Merge upstream dmd 39edbe17e

Backported fix from upstream dmd 2.079 for an internal compiler error
that occurred during semantic analysis on a recursive field initializer.

Fixes https://gcc.gnu.org/PR88989

Reviewed-on: https://github.com/dlang/dmd/pull/9284

From-SVN: r268740

5 years ago[NDS32] Refine register dwarf span.
Monk Chiang [Sun, 10 Feb 2019 09:09:19 +0000 (09:09 +0000)]
[NDS32] Refine register dwarf span.

gcc/
* config/nds32/nds32.c (nds32_dwarf_register_span): Refine register
dwarf span.

From-SVN: r268739

5 years ago[NDS32] Have nds32_spilt_doubleword to split POST_INC.
Chung-Ju Wu [Sun, 10 Feb 2019 09:00:43 +0000 (09:00 +0000)]
[NDS32] Have nds32_spilt_doubleword to split POST_INC.

gcc/
* config/nds32/nds32-md-auxiliary.c (nds32_spilt_doubleword): Support
to split POST_INC.

From-SVN: r268738

5 years agoDon't XPASS gnat.dg/lto19.adb
Rainer Orth [Sun, 10 Feb 2019 08:14:07 +0000 (08:14 +0000)]
Don't XPASS gnat.dg/lto19.adb

* gnat.dg/lto19.adb: Remove dg-excess-errors.

From-SVN: r268737

5 years ago[libbacktrace] Add btest_lto
Tom de Vries [Sun, 10 Feb 2019 03:16:09 +0000 (03:16 +0000)]
[libbacktrace] Add btest_lto

Add libbacktrace test-case using -flto.

2019-02-10  Tom de Vries  <tdevries@suse.de>

* Makefile.am (BUILDTESTS): Add btest_lto.
* Makefile.in: Regenerate.
* btest.c (test1, f2, f3, test3, f22, f23): Declare with
__attribute__((noclone)).

From-SVN: r268736

5 years agoDaily bump.
GCC Administrator [Sun, 10 Feb 2019 00:16:34 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r268735

5 years agoipa-visibility.c (localize_node): Also do not localize LDPR_PREVAILING_DEF_IRONLY_EXP.
Jan Hubicka [Sat, 9 Feb 2019 21:54:28 +0000 (22:54 +0100)]
ipa-visibility.c (localize_node): Also do not localize LDPR_PREVAILING_DEF_IRONLY_EXP.

* ipa-visibility.c (localize_node): Also do not localize
LDPR_PREVAILING_DEF_IRONLY_EXP.

From-SVN: r268732

5 years agoFix PR number.
Jan Hubicka [Sat, 9 Feb 2019 18:07:12 +0000 (18:07 +0000)]
Fix PR number.

From-SVN: r268729

5 years agore PR lto/87089 (tree check: expected class 'type', have 'declaration' (namespace_dec...
Jan Hubicka [Sat, 9 Feb 2019 18:01:03 +0000 (19:01 +0100)]
re PR lto/87089 (tree check: expected class 'type', have 'declaration' (namespace_decl) in type_with_linkage_p, at ipa-utils.h)

PR lto/87809
* tree.c (fld_simplified_type_name): Use DECL_ASSEMBLER_NAME_SET_P
instead of type_with_linkage.

From-SVN: r268728

5 years agore PR ipa/88755 (ICE in compute_fn_summary, at ipa-fnsummary.c:2513 since r267601)
Jan Hubicka [Sat, 9 Feb 2019 17:56:22 +0000 (18:56 +0100)]
re PR ipa/88755 (ICE in compute_fn_summary, at ipa-fnsummary.c:2513 since r267601)

PR ipa/88755
* params.def (uninlined-function-insns, uninlined-function-time,
uninlined-thunk-insns, uninlined-thunk-time): Add artificial upper
bound so we don't get overflows.

From-SVN: r268727

5 years agore PR fortran/89077 (ICE using * as len specifier for character parameter)
Harald Anlauf [Sat, 9 Feb 2019 17:25:23 +0000 (17:25 +0000)]
re PR fortran/89077 (ICE using * as len specifier for character parameter)

2019-02-09  Harald Anlauf  <anlauf@gmx.de>

PR fortran/89077
* resolve.c (gfc_resolve_substring_charlen): Check substring
length for constantness prior to general calculation of length.

PR fortran/89077
* gfortran.dg/substr_simplify.f90: New test.

From-SVN: r268726

5 years agors6000-string.c (expand_compare_loop, [...]): Insert REG_BR_PROB notes in inline...
Aaron Sawdey [Sat, 9 Feb 2019 17:06:12 +0000 (17:06 +0000)]
rs6000-string.c (expand_compare_loop, [...]): Insert REG_BR_PROB notes in inline expansion of memcmp/strncmp.

2019-02-09  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000-string.c (expand_compare_loop,
expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
memcmp/strncmp.

From-SVN: r268724

5 years agore PR ipa/88711 (scan-ipa-dump inline "Inlined tp_sum/)
Jan Hubicka [Sat, 9 Feb 2019 16:28:45 +0000 (17:28 +0100)]
re PR ipa/88711 (scan-ipa-dump inline "Inlined tp_sum/)

PR ipa/88711
* gfortran.dg/pr79966.f90: Xfail everwyhere.

From-SVN: r268723

5 years agore PR fortran/89200 (Erroneous copying of a derived type with a deferred-length chara...
Paul Thomas [Sat, 9 Feb 2019 11:11:33 +0000 (11:11 +0000)]
re PR fortran/89200 (Erroneous copying of a derived type with a deferred-length character array component)

2019-02-09  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/89200
* trans-array.c (gfc_trans_create_temp_array): Set the 'span'
field for derived types.

2019-02-09  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/89200
* gfortran.dg/array_reference_2.f90 : New test.

From-SVN: r268721

5 years agore PR middle-end/89246 (LTO produces references to cloned symbols which the compiler...
Jakub Jelinek [Sat, 9 Feb 2019 08:55:39 +0000 (09:55 +0100)]
re PR middle-end/89246 (LTO produces references to cloned symbols which the compiler failed to clone)

PR middle-end/89246
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
If !node->definition and TYPE_ARG_TYPES is non-NULL, use
TYPE_ARG_TYPES instead of DECL_ARGUMENTS.

* gcc.dg/gomp/pr89246-1.c: New test.
* gcc.dg/gomp/pr89246-2.c: New test.

From-SVN: r268718

5 years agoAdd noexcept to filesystem::path query functions
Jonathan Wakely [Sat, 9 Feb 2019 00:25:39 +0000 (00:25 +0000)]
Add noexcept to filesystem::path query functions

In the standard these member functions are specified in terms of the
potentially-throwing path decompositions functions, but we implement
them without constructing any new paths or doing anything else that can
throw.

PR libstdc++/71044
* include/bits/fs_path.h (path::has_root_name)
(path::has_root_directory, path::has_root_path)
(path::has_relative_path, path::has_parent_path)
(path::has_filename, path::has_stem, path::has_extension)
(path::is_absolute, path::is_relative, path::_M_find_extension): Add
noexcept.
* src/c++17/fs_path.cc (path::has_root_name)
(path::has_root_directory, path::has_root_path)
(path::has_relative_path, path::has_parent_path)
(path::has_filename, path::_M_find_extension): Add noexcept.

From-SVN: r268713

5 years agoDaily bump.
GCC Administrator [Sat, 9 Feb 2019 00:16:31 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r268712

5 years ago[RS6000] Correct save_reg_p
Alan Modra [Fri, 8 Feb 2019 22:20:58 +0000 (08:50 +1030)]
[RS6000] Correct save_reg_p

Fixes lack of r30 save/restore on

// -m32 -fpic -ftls-model=initial-exec
__thread char* p;
char** f1 (void) { return &p; }

and

// -m32 -fpic -msecure-plt
extern int foo (int);
int f1 (int x) { return foo (x); }

These are both caused by save_reg_p returning false when the pic
offset table reg (r30 for ABI_V4) was used, due to the logic not
exactly matching that in rs6000_emit_prologue to set up r30.

I also noticed that save_reg_p isn't following the comment regarding
calls_eh_return (since svn 267049, git 0edf78b1b2a0), and the comment
needs tweaking too.  For why the revised comment is correct, grep for
saves_all_registers in lra.c, and yes, we do want to save the pic
offset table reg for eh_return.

PR target/88343
* config/rs6000/rs6000.c (save_reg_p): Correct calls_eh_return
case.  Match logic in rs6000_emit_prologue emitting pic_offset_table
setup.

From-SVN: r268708

5 years agore PR tree-optimization/88739 (Big-endian union bug)
Jakub Jelinek [Fri, 8 Feb 2019 19:01:37 +0000 (20:01 +0100)]
re PR tree-optimization/88739 (Big-endian union bug)

PR tree-optimization/88739
* gcc.c-torture/execute/pr88739.c: New test.

From-SVN: r268706

5 years agore PR middle-end/88560 (armv8_2-fp16-move-1.c and related regressions after r266385)
Vladimir Makarov [Fri, 8 Feb 2019 19:01:10 +0000 (19:01 +0000)]
re PR middle-end/88560 (armv8_2-fp16-move-1.c and related regressions after r266385)

2019-02-08  Vladimir Makarov  <vmakarov@redhat.com>

PR middle-end/88560
* lra-constraints.c (process_alt_operands): Don't increase reject
for memory when offset memory is required.

From-SVN: r268705

5 years agore PR testsuite/89258 (verify_gimple failed in gimple test pr80887 for 16-bit target)
Jozef Lawrynowicz [Fri, 8 Feb 2019 16:47:28 +0000 (16:47 +0000)]
re PR testsuite/89258 (verify_gimple failed in gimple test pr80887 for 16-bit target)

2019-02-08  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

PR testsuite/89258
* gcc.dg/tree-ssa/pr80887.c: Require int32plus.

From-SVN: r268704

5 years agoS/390: Implement vector copysign.
Robin Dapp [Fri, 8 Feb 2019 14:25:48 +0000 (14:25 +0000)]
S/390: Implement vector copysign.

This patch implements the vector copysign operation using vector select and a
signbit mask.

gcc/ChangeLog:

2019-02-08  Robin Dapp  <rdapp@linux.ibm.com>

* config/s390/vector.md: Implement vector copysign.

gcc/testsuite/ChangeLog:

2019-02-08  Robin Dapp  <rdapp@linux.ibm.com>

* gcc.target/s390/vector/vec-copysign-execute.c: New test.
* gcc.target/s390/vector/vec-copysign.c: New test.

From-SVN: r268697

5 years agoexpr.c: Correct indentations in expand_constructor
H.J. Lu [Fri, 8 Feb 2019 14:19:09 +0000 (14:19 +0000)]
expr.c: Correct indentations in expand_constructor

* expr.c (expand_constructor): Correct indentations.

From-SVN: r268696

5 years agore PR tree-optimization/89247 (ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2409)
Richard Biener [Fri, 8 Feb 2019 13:21:36 +0000 (13:21 +0000)]
re PR tree-optimization/89247 (ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2409)

2019-02-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89247
* tree-if-conv.c: Include tree-cfgcleanup.h.
(version_loop_for_if_conversion): Record LOOP_VECTORIZED call.
(tree_if_conversion): Pass through predicate vector.
(pass_if_conversion::execute): Do CFG cleanup and SSA update
inline, see if any if-converted loops we refrece in
LOOP_VECTORIZED calls vanished and fixup.
* tree-if-conv.h (tree_if_conversion): Adjust prototype.

* gcc.dg/torture/pr89247.c: New testcase.

From-SVN: r268689

5 years agoS/390: Introduce jdd constraint
Ilya Leoshkevich [Fri, 8 Feb 2019 12:39:27 +0000 (12:39 +0000)]
S/390: Introduce jdd constraint

Implementation of section anchors in S/390 back-end added in r266741
broke jump labels in S/390 Linux kernel [1].  Currently jump labels
pass global variable addresses to .quad directive in inline assembly
using "X" constraint.  In the past this used to produce regular symbol
references, however, after r266741 we sometimes get values like
(plus (reg) (const_int)), where (reg) points to a section anchor.
Strictly speaking, this is still correct, since "X" accepts anything.
Thus, now we need another way to support jump labels.

The existing "i" constraint cannot be used, since with -fPIC it must
not accept non-local symbols, however, jump labels do require that,
e.g. __tracepoint_xdp_exception from kernel proper might be referenced
from kernel modules.

The existing "ZL" constraint cannot be used for the same reason.

The existing "b" constraint cannot be used because of the way
expand_asm_stmt works.  It deduces whether the constraint allows
regs, subregs or mems, and processes asm operands differently based on
that.  "b" is supposed to accept values like (mem (symbol_ref)), and
there appears to be no way to explain to expand_asm_stmt that for "b"
mem's address must not be in a register.

This patch introduces the new machine-specific constraint named "jdd" -
"j" prefix is already used for constants, and "d" stands for "data".
It accepts anything that fits into the data section, whether or not
this might require a relocation, that is, anything that passes
CONSTANT_P check.

[1] https://lkml.org/lkml/2019/1/23/346

gcc/ChangeLog:

2019-02-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* config/s390/constraints.md (jdd): New constraint.

gcc/testsuite/ChangeLog:

2019-02-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/jump-label.c: New test.

From-SVN: r268688

5 years agore PR testsuite/89250 (gcc.dg/vect/vect-24.c XPASSes)
Richard Biener [Fri, 8 Feb 2019 11:56:28 +0000 (11:56 +0000)]
re PR testsuite/89250 (gcc.dg/vect/vect-24.c XPASSes)

2019-02-08  Richard Biener  <rguenther@suse.de>

PR testsuite/89250
* gcc.dg/vect/vect-24.c: Remove XFAIL on vect_condition targets.

From-SVN: r268680

5 years agotrans.c (gnat_to_gnu): Minor tweak.
Eric Botcazou [Fri, 8 Feb 2019 11:37:40 +0000 (11:37 +0000)]
trans.c (gnat_to_gnu): Minor tweak.

* gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
* gcc-interface/utils.c (convert): Do not pad when doing an unchecked
conversion here.  Use TREE_CONSTANT throughout the function.
(unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
destination is a more aligned array type or a larger aggregate type,
but not between original and packable versions of a type.

From-SVN: r268679

5 years agoi386: Use OI/TImode in *mov[ot]i_internal_avx with AVX512VL
H.J. Lu [Fri, 8 Feb 2019 11:30:53 +0000 (11:30 +0000)]
i386: Use OI/TImode in *mov[ot]i_internal_avx with AVX512VL

OImode and TImode moves must be done in XImode to access upper 16
vector registers without AVX512VL.  With AVX512VL, we can access
upper 16 vector registers in OImode and TImode.

PR target/89229
* config/i386/i386.md (*movoi_internal_avx): Set mode to XI for
upper 16 vector registers without TARGET_AVX512VL.
(*movti_internal): Likewise.

From-SVN: r268678

5 years agoutils.c (max_size): Be prepared for an operand with VOID_TYPE.
Eric Botcazou [Fri, 8 Feb 2019 11:20:23 +0000 (11:20 +0000)]
utils.c (max_size): Be prepared for an operand with VOID_TYPE.

* gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
operand with VOID_TYPE.

From-SVN: r268675

5 years agotrans.c (elaborate_all_entities): Do not elaborate the entities of a package renaming...
Eric Botcazou [Fri, 8 Feb 2019 11:19:51 +0000 (11:19 +0000)]
trans.c (elaborate_all_entities): Do not elaborate the entities of a package renaming another one.

* gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
entities of a package renaming another one.

From-SVN: r268674

5 years agotrans.c (Regular_Loop_to_gnu): Replace tests on individual flag_unswitch_loops and...
Eric Botcazou [Fri, 8 Feb 2019 11:07:08 +0000 (11:07 +0000)]
trans.c (Regular_Loop_to_gnu): Replace tests on individual flag_unswitch_loops and flag_tree_loop_vectorize...

* gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
individual flag_unswitch_loops and flag_tree_loop_vectorize switches
with test on global optimize switch.
(Raise_Error_to_gnu): Likewise.

From-SVN: r268671