2014-01-08 Rong Xu <xur@google.com>
* gcc/gcov-io.c (gcov_var): Move from gcov-io.h.
(gcov_position): Ditto.
(gcov_is_error): Ditto.
(gcov_rewrite): Ditto.
* gcc/gcov-io.h: Refactor. Move gcov_var to gcov-io.h, and libgcov
only part to libgcc/libgcov.h.
* libgcc/libgcov-driver.c: Use libgcov.h.
(buffer_fn_data): Use xmalloc instead of malloc.
(gcov_exit_merge_gcda): Ditto.
* libgcc/libgcov-driver-system.c (allocate_filename_struct): Ditto.
* libgcc/libgcov.h: New common header files for libgcov-*.h.
* libgcc/libgcov-interface.c: Use libgcov.h
* libgcc/libgcov-merge.c: Ditto.
* libgcc/libgcov-profiler.c: Ditto.
* libgcc/Makefile.in: Add dependence to libgcov.h
From-SVN: r206435
2014-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/59630
* gimple.h (is_gimple_builtin_call): Remove.
(gimple_builtin_call_types_compatible_p): New.
(gimple_call_builtin_p): New overload.
* gimple.c (is_gimple_builtin_call): Remove.
(validate_call): Rename to ...
(gimple_builtin_call_types_compatible_p): ... this and export. Also
check return types.
(validate_type): New static function.
(gimple_call_builtin_p): New overload and adjust.
* gimple-fold.c (gimple_fold_builtin): Fold the return value.
(gimple_fold_call): Likewise. Use gimple_call_builtin_p.
(gimple_fold_stmt_to_constant_1): Likewise.
* tsan.c (instrument_gimple): Use gimple_call_builtin_p.
* gcc.dg/pr59630.c: New testcase.
From-SVN: r206421
2014-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/59471
* gimplify.c (gimplify_expr): Gimplify register-register type
VIEW_CONVERT_EXPRs to separate stmts.
* gcc.dg/pr59471.c: New testcase.
From-SVN: r206420
PR middle-end/53623
* ree.c (combine_set_extension): Handle case where source
and destination registers in an extension insn are different.
(combine_reaching_defs): Allow source and destination
registers in extension to be different under limited
circumstances.
(add_removable_extension): Remove restriction that the
source and destination registers in the extension are the
same.
(find_and_remove_re): Emit a copy from the extension's
destination to its source after the defining insn if
the source and destination registers are different.
PR middle-end/53623
* gcc.target/i386/pr53623.c: New test.
From-SVN: r206418
PR middle-end/59285
* ifcvt.c (merge_if_block): If we are merging a block with more than
one successor with a block with no successors, remove any BARRIER
after the second block.
From-SVN: r206417
PR target/59652
* config/pa/pa.c (pa_legitimate_address_p): Return false before reload
for 14-bit register offsets when INT14_OK_STRICT is false.
From-SVN: r206413
2014-01-07 Roland Stigge <stigge@antcom.de>
Michael Meissner <meissner@linux.vnet.ibm.com>
PR 57386/target
* config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p):
Only check TFmode for SPE constants. Don't check TImode or
TDmode.
Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
From-SVN: r206401
gcc/
* config/arm/arm.c (arm_expand_neon_args): Call expand_expr
with EXPAND_MEMORY for NEON_ARG_MEMORY; check if the returned
rtx is const0_rtx or not.
gcc/testsuite/
* gcc.target/arm/neon/vst1Q_laneu64-1.c: New test.
From-SVN: r206395
gcc/
PR target/58115
* target-globals.c (save_target_globals): Remove this_fn_optab
handling.
* toplev.c: Include optabs.h.
(target_reinit): Temporarily restore the global options if another
set of options are in force.
gcc/testsuite/
* gcc.target/i386/intrinsics_4.c (bar): New function.
From-SVN: r206394
/cp
2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
* semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
the letter of 20.11.6 about Base and Derived naming the same
class type modulo cv-qualifiers.
/testsuite
2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/ext/is_base_of_incomplete-2.C: New.
From-SVN: r206386
PR rtl-optimization/58668
* cfgcleanup.c (flow_find_cross_jump): Don't count
any jumps if dir_p is NULL. Remove p1 variable, use active_insn_p
to determine what is counted.
(flow_find_head_matching_sequence): Use active_insn_p to determine
what is counted.
(try_head_merge_bb): Adjust for the flow_find_head_matching_sequence
counting change.
* ifcvt.c (count_bb_insns): Use active_insn_p && !JUMP_P to
determine what is counted.
* gcc.dg/pr58668.c: New test.
From-SVN: r206385
PR tree-optimization/59643
* tree-predcom.c (split_data_refs_to_components): If one dr is
read and one write, determine_offset fails and the write isn't
in the bad component, just put the read into the bad component.
* gcc.dg/pr59643.c: New test.
* gcc.c-torture/execute/pr59643.c: New test.
From-SVN: r206384
2014-01-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/59589
* class.c (comp_is_finalizable): New function to dermine if a given
component is finalizable.
(finalize_component, generate_finalization_wrapper): Use it.
2014-01-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/59589
* gfortran.dg/class_allocate_16.f90: New.
From-SVN: r206379
PR target/59644
* config/i386/i386.h (struct machine_function): Add
no_drap_save_restore field.
* config/i386/i386.c (ix86_save_reg): Use
!cfun->machine->no_drap_save_restore instead of
crtl->stack_realign_needed.
(ix86_finalize_stack_realign_flags): Don't clear drap_reg unless
this function clears frame_pointer_needed. Set
cfun->machine->no_drap_save_restore if clearing frame_pointer_needed
and DRAP reg is needed.
* gcc.target/i386/pr59644.c: New test.
From-SVN: r206375
I am reliably informed that the architecture name and letter for the
plan9/inferno compilers for 64-bit ARM systems will be "arm64" and "7"
respectively, so let's get that bit in nice and early.
From Michael Hudson-Doyle.
https://codereview.appspot.com/34830045/
From-SVN: r206374
PR c/57773
* doc/implement-c.texi: Mention that other integer types are
permitted as bit-field types in strictly conforming mode.
c/
* c-decl.c (check_bitfield_type_and_width): Warn for implementation
defined bit-field types only in ISO C.
testsuite/
* gcc.dg/pr57773.c: New test.
From-SVN: r206373
Fix PR c++/59638
PR c++/59638
* cp/parser.c (cp_parser_init_declarator): Undo fully implicit
template parameter list when declarator is not a function.
* g++.dg/cpp1y/pr59638.C: New testcase.
From-SVN: r206371
Fix PR c++/59636
PR c++/59636
* cp/parser.c (cp_parser_template_parameter): Early out with
error_mark_node if parameter declaration was not parsed.
* g++.dg/cpp1y/pr59636.C: New testcase.
From-SVN: r206369
Fix PR c++/59635
PR c++/59635
* cp/lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
function as unimplemented for generic lambdas with varargs.
* g++.dg/cpp1y/pr59635.C: New testcase.
From-SVN: r206368
Commit 199570 fixed the --disable-install-libiberty behavior, but it also
added a bug where the enable path never works because the initial clear
of target_header_dir wasn't deleted. So we end up initializing properly
at the top only to reset it at the end all the time.
From-SVN: r206367
libiberty/
2014-01-06 Gary Benson <gbenson@redhat.com>
* cp-demangle.c (struct d_print_info): New fields
next_saved_scope, copy_templates, next_copy_template and
num_copy_templates.
(d_count_templates): New function.
(d_print_init): New parameter "dc".
Estimate numbers of templates and scopes required.
(d_print_free): Removed function.
(cplus_demangle_print_callback): Allocate stack for
templates and scopes. Removed call to d_print_free.
(d_copy_templates): Removed function.
(d_save_scope): New function.
(d_get_saved_scope): Likewise.
(d_print_comp): Replace state saving/restoring code with
calls to d_save_scope and d_get_saved_scope.
From-SVN: r206362