for gcc/ChangeLog
PR rtl-optimization/64164
* Makefile.in (OBJS): Drop tree-ssa-copyrename.o.
* tree-ssa-copyrename.c: Removed.
* opts.c (default_options_table): Drop -ftree-copyrename. Add
-ftree-coalesce-vars.
* passes.def: Drop all occurrences of pass_rename_ssa_copies.
* common.opt (ftree-copyrename): Ignore.
(ftree-coalesce-inlined-vars): Likewise.
* doc/invoke.texi: Remove the ignored options above.
* gimple-expr.h (gimple_can_coalesce_p): Move declaration
* tree-ssa-coalesce.h: ... here.
* tree-ssa-uncprop.c: Include tree-ssa-coalesce.h and other
headers required by it.
* gimple-expr.c (gimple_can_coalesce_p): Allow coalescing
across variables when flag_tree_coalesce_vars. Check register
use and promoted modes to allow coalescing. Moved to
tree-ssa-coalesce.c.
* tree-ssa-live.c (struct tree_int_map_hasher): Move along
with its member functions to tree-ssa-coalesce.c.
(var_map_base_init): Likewise. Renamed to
compute_samebase_partition_bases.
(partition_view_normal): Drop want_bases parameter.
(partition_view_bitmap): Likewise.
* tree-ssa-live.h: Adjust declarations.
* tree-ssa-coalesce.c: Include explow.h.
(build_ssa_conflict_graph): Process PARM_ and RESULT_DECLs's
default defs at the entry point.
(dump_part_var_map): New.
(compute_optimized_partition_bases): New, called by...
(coalesce_ssa_name): ... when flag_tree_coalesce_vars, instead
of compute_samebase_partition_bases. Adjust.
* alias.c (nonoverlapping_memrefs_p): Disregard gimple-regs.
* cfgexpand.c (leader_merge): New.
(get_rtl_for_parm_ssa_default_def): New.
(set_rtl): Merge exprs and attrs, even for MEMs and non-SSA
vars. Update DECL_RTL for PARM_DECLs and RESULT_DECLs too.
(expand_one_stack_var_at): Handle anonymous SSA_NAMEs. Drop
redundant MEM attr setting.
(expand_one_stack_var_1): Handle anonymous SSA_NAMEs. Renamed
from...
(expand_one_stack_var): ... this. New wrapper to check and
skip already expanded SSA partitions.
(record_alignment_for_reg_var): New, factored out of...
(expand_one_var): ... this.
(expand_one_ssa_partition): New.
(adjust_one_expanded_partition_var): New.
(expand_one_register_var): Check and skip already expanded SSA
partitions.
(expand_used_vars): Don't create DECLs for anonymous SSA
names. Expand all SSA partitions, then adjust all SSA names.
(pass::execute): Replace the loops that set
SA.partition_to_pseudo from partition leaders and cleared
DECL_RTL for multi-location variables, and that which used to
rename vars and set attrs, with one that clears DECL_RTL and
checks that PARMs and RESULTs default_defs match DECL_RTL.
* cfgexpand.h (get_rtl_for_parm_ssa_default_def): Declare.
* emit-rtl.c (set_reg_attrs_for_parm): Handle NULL decl.
* explow.c (promote_ssa_mode): New.
* explow.h (promote_ssa_mode): Declare.
* expr.c (expand_expr_real_1): Handle anonymous SSA_NAMEs.
* function.c: Include cfgexpand.h.
(use_register_for_decl): Handle SSA_NAMEs, anonymous or not.
(use_register_for_parm_decl): Wrapper for the above to
special-case the result_ptr.
(rtl_for_parm): Ditto for get_rtl_for_parm_ssa_default_def.
(maybe_reset_rtl_for_parm): Reset DECL_RTL of parms with
multiple locations.
(assign_parm_adjust_stack_rtl): Add all and parm arguments,
for rtl_for_parm. For SSA-assigned parms, zero stack_parm.
(assign_parm_setup_block): Prefer SSA-assigned location.
(assign_parm_setup_reg): Likewise. Use entry_parm for equiv
if stack_parm is NULL.
(assign_parm_setup_stack): Prefer SSA-assigned location.
(assign_parms): Maybe reset DECL_RTL of params. Adjust stack
rtl before testing for pointer bounds. Special-case result_ptr.
(expand_function_start): Maybe reset DECL_RTL of result.
Prefer SSA-assigned location for result and static chain.
Factor out DECL_RESULT and SET_DECL_RTL.
* tree-outof-ssa.c (insert_value_copy_on_edge): Handle
anonymous SSA names. Use promote_ssa_mode.
(get_temp_reg): Likewise.
(remove_ssa_form): Adjust.
* var-tracking.c (dataflow_set_clear_at_call): Take call_insn
and get its reg_usage for reg invalidation.
(compute_bb_dataflow): Pass it insn.
(emit_notes_in_bb): Likewise.
* tree-ssa-loop-niter.c (loop_exits_before_overflow): Don't
fail assert on conversion between unsigned types.
for gcc/testsuite/ChangeLog
* gcc.dg/guality/pr54200.c: Add -fno-tree-coalesce-vars.
* gcc.dg/ssp-1.c: Make counter a register.
* gcc.dg/ssp-2.c: Likewise.
* gcc.dg/torture/parm-coalesce.c: New.
From-SVN: r224262
* lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
* tree.c (gimple_canonical_types_compatible_p): Drop comparsion of
TYPE_STRING_FLAG.
* gfortran.dg/lto/bind_c-2b_0.f90: New testcase
* gfortran.dg/lto/bind_c-2b_1.c: New testcase
From-SVN: r224252
2015-06-08 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/66444
* postreload.c (reload_combine): Use get_call_reg_set_usage instead of
call_used_regs.
* gcc.dg/pr66444.c: New test.
From-SVN: r224240
2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66245
* match.c (gfc_match_type_is, gfc_match_class_is): Check if the
return type spec or derived type spec is validate.
2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66245
* gfortran.dg/class_is_1.f90: New test.
* gfortran.dg/type_is_1.f90: Ditto.
From-SVN: r224237
PR c/66415
* c-format.c (location_from_offset): Return LOC if LINE is null.
* line-map.c (linemap_position_for_loc_and_offset): Remove
linemap_assert_fails; reverse conditions.
* gcc.dg/cpp/pr66415-1.c: New test.
* gcc.dg/cpp/pr66415-2.c: New test.
From-SVN: r224236
* genattrtab.c (insn_alternatives): Change type from int *
to uint64_t *.
(check_attr_test): Shift ((uint64_t) 1) instead of 1 up.
(get_attr_value): Change type of num_alt to uint64_t.
(compute_alternative_mask): Change return type from
int to uint64_t, shift ((uint64_t) 1) instead of 1 up.
(make_alternative_compare, mk_attr_alt): Change argument type
from int to uint64_t.
(simplify_test_exp): Change type of i from int to uint64_t.
Shift ((uint64_t) 1) instead of 1 up.
(main): Adjust oballocvec first argument from int to uint64_t.
Shift ((uint64_t) 1) instead of 1 up.
From-SVN: r224227
PR libstdc++/66441
* testsuite/22_locale/conversions/string/66441.cc: New.
* include/bits/locale_conv.h (__do_str_codecvt): Reserve enough space
in the output string for BOM and complete result.
From-SVN: r224222
2015-06-08 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vectorizable_load): Compute the pointer
adjustment for gaps at the end of a SLP load group properly.
* tree-vect-slp.c (vect_supported_load_permutation_p): Allow
all permutations we can generate.
(vect_transform_slp_perm_load): Use the correct group-size.
* gcc.dg/vect/slp-perm-10.c: New testcase.
* gcc.dg/vect/slp-23.c: Adjust.
* gcc.dg/torture/pr53366-2.c: Also verify cross-iteration
vector pointer update.
From-SVN: r224221
2015-06-08 Marc Glisse <marc.glisse@inria.fr>
* genmatch.c (expr::gen_transform): For conditions, guess the type
from the second operand.
From-SVN: r224220
2015-06-08 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/66442
* gimple-iterator.h (gimple_seq_nondebug_singleton_p): Add function.
* tree-parloops.c (try_transform_to_exit_first_loop_alt): Return false
if the loop latch is not a singleton. Use
gimple_seq_nondebug_singleton_p instead of gimple_seq_singleton_p.
From-SVN: r224218
* alias.c (get_alias_set): Be ready for TYPE_CANONICAL
of ptr_type_node to not be ptr_to_node.
* tree.c (gimple_types_compatible_p): Do not match TREE_CODE of
TREE_TYPE of pointers.
* gimple-expr.c (useless_type_conversion): Reorder the check for
function pointers and TYPE_CANONICAL.
* lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
pointers.
* gfortran.dg/lto/bind_c-1_0.f90: New testcase.
* gfortran.dg/lto/bind_c-1_1.c: New testcase.
* gcc.dg/lto/c-compatible-types_0.c: Rename to ...
* gcc.dg/lto/c-compatible-types-1_0.c: this one; fix template
* gcc.dg/lto/c-compatible-types_1.c: Rename to ...
* gcc.dg/lto/c-compatible-types-1_1.c: this one; harden for
-fshort-enum.
From-SVN: r224201
PR bootstrap/66319
* config/pa/pa-hpux10.h (TARGET_OS_CPP_BUILTINS): Rearrange builtin
defines. Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE for c++.
Define _XOPEN_UNIX and _XOPEN_SOURCE_EXTENDED for c++ if unix95 or
later.
* config/pa/pa-hpux11.h (TARGET_OS_CPP_BUILTINS): Likewise.
Define _INCLUDE_STDC_SOURCE_PRE_199901, _INCLUDE_STDC_SOURCE_199901,
_INCLUDE_XOPEN_SOURCE_PRE_500, _INCLUDE_XOPEN_SOURCE_520,
_INCLUDE_XOPEN_SOURCE_PRE_600 and _INCLUDE_XOPEN_SOURCE_600 for c++
and non iso if unix2003.
From-SVN: r224192
2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
PR fortran/47359
* arith.c (eval_intrinsic_op): Set warn flag for
gfc_type_convert_binary if -Wconversion or -Wconversion-extra
are set.
(wprecision_real_real): New function.
(wprecision_int_real): New function.
(gfc_int2int): If -fno-range-check and -Wconversion are specified
and it is a narrowing conversion, warn.
(gfc_int2real): If there is a change in value for the conversion,
warn.
(gfc_int2complex): Likewise.
(gfc_real2int): If there is a fractional part to the real number,
warn with -Wconversion, otherwise warn with -Wconversion-extra.
(gfc_real2real): Emit warning if the constant was changed by
conversion with either -Wconversion or -Wconversion-extra. With
-Wconversion-extra, warn if no warning was issued earlier.
(gfc_real2complex): Likewise.
(gfc_complex2int): For -Wconversion or -Wconversion-extra, if
there was an imaginary part, warn; otherwise, warn for change in
value. Warn with -Wconversion-extra if no other warning was
issued.
(gfc_complex2real): For -Wconversion or -Wconversion-extra, if
there was an imaginary part, warn; otherwise, warn for change in
value. Warn with -Wconversion-extra if no other warning was
issued.
(gfc_complex2complex): For -Wconversion, warn if the value of
either the real or the imaginary part was changed. Warn for
-Wconversion-extra if no prior warning was issued.
* expr.c (gfc_check_assign): Remove check for change in value.
* primary.c (match_real_constant): For -Wconversion-extra, check
against a number in which the last non-zero digit has been
replaced with a zero. If the number compares equal, warn.
* intrinsic.c (gfc_convert_type_warn): Do not warn about constant
conversions.
2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
PR fortran/47359
* gfortran.dg/array_constructor_type_17.f03: Adjust error message.
* gfortran.dg/warn_conversion.f90: Add warning for change in value
for assignment.
* gfortran.dg/warn_conversion_3.f90: Add warnings.
* gfortran.dg/warn_conversion_5.f90: New test.
* gfortran.dg/warn_conversion_6.f90: New test.
* gfortran.dg/warn_conversion_7.f90: New test.
From-SVN: r224190
2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66347
* resolve.c (apply_default_init_local): Do not dereference a NULL
pointer.
2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66347
* gfortran.dg/blockdata_9.f: New test.
From-SVN: r224175