gcc/
* reg-notes.def (CFA_VAL_EXPRESSION): New entry.
* dwarf2cfi.c (dwarf2out_frame_debug_cfa_val_expression): New function.
(dwarf2out_frame_debug): Support REG_CFA_VAL_EXPRESSION.
(output_cfa_loc): Support DW_CFA_val_expression.
(output_cfa_loc_raw): Likewise.
(output_cfi): Likewise.
(output_cfi_directive): Likewise.
* dwarf2out.c (dw_cfi_oprnd1_desc): Support DW_CFA_val_expression.
(dw_cfi_oprnd2_desc): Likewise.
(mem_loc_descriptor): Recognize new pattern generated for value
expression.
From-SVN: r241826
This silences tons of -Wformat= warnings when building ARC Linux kernel
with gcc 6.x (and restores the ARC gcc 4.8.x behaviour) which had
similar fix.
gcc/
2016-11-03 Vineet Gupta <vgupta@synopsys.com>
* config/arc/arc.h (SIZE_TYPE): Define as unsigned int.
(PTRDIFF_TYPE): Define as int.
From-SVN: r241812
The test defines int bitfields that are more than 16 bits wide, and this
fails for the avr with its 16 bit integer size. Therefore, require
effective target int32plus.
gcc/testsuite/
2016-11-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.c-torture/execute/pr78170.c: Require int32plus.
From-SVN: r241809
With jump trampolines implemented in binutils since 2.25 and enabled by
default this test no longer fails on xtensa.
2016-11-02 Max Filippov <jcmvbkbc@gmail.com>
gcc/testsuite/
* gcc.c-torture/compile/20001226-1.c: Don't xfail on xtensa.
From-SVN: r241801
xtensa gcc gets ICE on pr59037.c test because its xtensa_output_literal
function cannot handle integer literals of sizes other than 4 and 8,
whereas the test uses 16-byte int vector.
Split integer literal formatting into the recursive function
xtensa_output_integer_literal_parts capable of handling literals of any
power of 2 size not less than 4.
2016-11-02 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_output_integer_literal_parts):
New function.
(xtensa_output_literal): Use xtensa_output_integer_literal_parts
to format MODE_INT and MODE_PARTIAL_INT literals.
From-SVN: r241800
With the SPE ABI, if we wrap GPRs we need to handle the upper half of the
extended 64-bit registers as well, which we cannot easily do. So, this
patch disables separate shrink-wrapping for the SPE ABI.
PR target/78168
* config/r6000/rs6000.c (rs6000_get_separate_components): Return
NULL if TARGET_SPE_ABI.
From-SVN: r241799
2016-11-02 Richard Biener <rguenther@suse.de>
* gimple-ssa-store-merging.c: Include gimplify-me.h.
(imm_store_chain_info::output_merged_stores): Force base_addr
to be proper GIMPLE for a MEM_REF address.
(pass_store_merging::execute): Restrict negative bitpos
handling to non-MEM_REF bases. Remove TREE_THIS_VOLATILE
check. Take into account non-NULL_TREE offset if the base
is already addressable.
* gcc.dg/store_merging_8.c: New testcase.
From-SVN: r241796
Add LE/BE SHA1H patterns with a V2SI input. This avoids unnecessary
DUPs when using intrinsics like vsha1h_u32 (vgetq_lane_u32 (x, 0)).
gcc/
* config/aarch64/aarch64-simd.md (aarch64_crypto_sha1hv4si):
New pattern.
(aarch64_be_crypto_sha1hv4si): New pattern.
From-SVN: r241791
The add expander still contains some expansion code that was required for the
previous prolog/epilog code, but which is no longer needed. I also noticed
that the current version splits off immediates from frame addressing
instructions, which doesn't seem a good idea. Avoiding this resulted in small
codesize improvements.
gcc/
* config/aarch64/aarch64.md (add<mode>3): Remove
redundant code. Don't split frame based additions.
From-SVN: r241790
2016-11-02 Richard Biener <rguenther@suse.de>
* gimple-ssa-store-merging.c (struct store_immediate_info): Remove
redundant val and dest members.
(store_immediate_info::store_immediate_info): Adjust.
(merged_store_group::merged_store_group): Adjust.
(merged_store_group::apply_stores): Likewise.
(struct imm_store_chain_info): Add base_addr field.
(imm_store_chain_info::imm_store_chain_info): New constructor.
(imm_store_chain_info::terminate_and_process_chain): Do not pass base.
(imm_store_chain_info::output_merged_store): Likewise. Use
addr_base which is already the address.
(imm_store_chain_info::output_merged_stores): Likewise.
(pass_tree_store_merging::terminate_all_aliasing_chains): Take
imm_store_chain_info instead of base. Fix alias check.
(pass_tree_store_merging::terminate_and_release_chain): Likewise.
(imm_store_chain_info::coalesce_immediate_stores): Adjust.
(pass_store_merging::execute): Refuse to operate on TARGET_MEM_REF.
use the address of the base and adjust for other changes.
From-SVN: r241789
* fold-const-call.c (host_size_t_cst_p): Test whether
t is convertible to size_t.
* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c (main): Add
test case.
From-SVN: r241780
PR tree-optimization/78170
* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Truncate padding
introduced by native_encode_expr on little-endian as well.
* gcc.c-torture/execute/pr78170.c: New test.
From-SVN: r241779
PR tree-optimization/78162
* gimple-ssa-store-merging.c (execute): Mark stores with bitpos < 0
as invalid.
* gcc.c-torture/compile/pr78162.c: New test.
From-SVN: r241778
2016-11-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/78047
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Initialize
fake field at offset zero conservatively regarding to may_have_pointers.
From-SVN: r241775
gcc/c-family/
* c.opt (-fnew-inheriting-ctors): New.
* c-opts.c: Default to on for ABI 11+.
gcc/cp/
* call.c (enum rejection_reason_code): Add rr_inherited_ctor.
(inherited_ctor_rejection): New.
(add_function_candidate): Reject inherited ctors for copying.
(enforce_access): Use strip_inheriting_ctors.
(print_z_candidate): Likewise. Handle rr_inherited_ctor.
(convert_like_real): Avoid copying inheriting ctor parameters.
(build_over_call): Likewise. A base ctor inheriting from vbase
has no parms. Sorry about varargs.
(joust): A local constructor beats inherited with the same convs.
* class.c (add_method): Handle hiding inheriting ctors.
(one_inherited_ctor): Handle new semantics.
(add_implicitly_declared_members): Pass using_decl down.
(build_clone): A base ctor inheriting from vbase has no parms.
* cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base.
(SET_DECL_INHERITED_CTOR): Likewise.
(DECL_INHERITED_CTOR_BASE): Adjust.
* constexpr.c: Adjust.
* error.c (dump_function_decl): Decorate inheriting ctors.
* init.c (emit_mem_initializers): Suppress access control in
inheriting ctor.
* mangle.c (write_special_name_constructor): Handle new inheriting
ctor mangling.
* method.c (strip_inheriting_ctors, inherited_ctor_binfo)
(ctor_omit_inherited_parms, binfo_inherited_from): New.
(synthesized_method_walk): Use binfo_inherited_from. Suppress
access control in inheriting ctor.
(deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance.
(maybe_explain_implicit_delete): Explain ambigous ctor inheritance.
(add_one_base_init, do_build_copy_constructor): Adjust.
(locate_fn_flags, explain_implicit_non_constexpr): Adjust.
(implicitly_declare_fn): Adjust.
(get_inherited_ctor): Remove.
* name-lookup.c (do_class_using_decl): Check for indirect ctor
inheritance.
* optimize.c (cdtor_comdat_group): Adjust for new mangling.
(maybe_clone_body): Handle omitted parms in base clone.
(maybe_thunk_body): Don't thunk if base clone omits parms.
* pt.c (tsubst_decl): Adjust.
(instantiate_template_1): Suppress access control in inheriting
ctor.
(fn_type_unification): Do deduction with inherited ctor.
* tree.c (special_function_p): Adjust.
gcc/
* tree-inline.c (copy_tree_body_r): Only copy the taken branch of
a COND_EXPR with constant condition.
libiberty/
* cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor.
From-SVN: r241765
When a symbol cannot be demangled in ada_demangle a new demangled VEC
will be allocated without deleting the demangled VEC already in use.
Running testsuite/test-demangle under valgrind will show the leak for
this entry in testsuite/demangle-expected:
# Elaborated flag (not demangled)
--format=gnat
x_E
<x_E>
11 bytes in 1 blocks are definitely lost in loss record 1 of 1
at 0x4C27BE3: malloc (vg_replace_malloc.c:299)
by 0x413FE7: xmalloc (xmalloc.c:148)
by 0x4025EC: ada_demangle (cplus-dem.c:930)
by 0x402C59: cplus_demangle (cplus-dem.c:892)
by 0x400FEC: main (test-demangle.c:317)
libiberty/ChangeLog:
* cplus-dem.c (ada_demangle): Initialize demangled to NULL and
XDELETEVEC demangled when unknown.
From-SVN: r241760