libcpp/
* line-map.c (linemap_add): Assert that reason must not be
LC_RENAME when called for the first time on a "main input file".
c-family/
* c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as it's
the first time it's being called on this main TU.
gcc/lto/
* lto-lang.c (lto_init): Likewise. Also, avoid calling
linemap_add twice.
gcc/fortran/
* scanner.c (load_file): Don't abuse LC_RENAME reason while
(indirectly) calling linemap_add.
From-SVN: r178146
Core DR 342
PR c++/48582
* pt.c (check_valid_ptrmem_cst_expr): A null member pointer value
is valid in C++11.
(convert_nontype_argument): Likewise. Implicitly convert nullptr
and do constant folding.
* mangle.c (write_template_arg_literal): Mangle null member
pointer values as 0.
* call.c (null_member_pointer_value_p): New.
* cp-tree.h: Declare it.
From-SVN: r178144
* doc/rtl.texi (simple_return): Document.
(parallel, PATTERN): Here too.
* doc/md.texi (return): Mention it's allowed to expand to simple_return
in some cases.
(simple_return): Document standard pattern.
* gengenrtl.c (special_rtx): SIMPLE_RETURN is special.
* final.c (final_scan_insn): Use ANY_RETURN_P on body.
* reorg.c (function_return_label, function_simple_return_label):
New static variables, replacing...
(end_of_function_label): ... this.
(simplejump_or_return_p): New static function.
(optimize_skip, steal_delay_list_from_fallthrough,
fill_slots_from_thread): Use it.
(relax_delay_slots): Likewise. Use ANY_RETURN_P on body.
(rare_destination, follow_jumps): Use ANY_RETURN_P on body.
(find_end_label): Take a new arg which is one of the two return
rtxs. Depending on which, set either function_return_label or
function_simple_return_label. All callers changed.
(make_return_insns): Make both kinds.
(dbr_schedule): Adjust for two kinds of end labels.
* function.c (emit_return_into_block): Set JUMP_LABEL properly.
* genemit.c (gen_exp): Handle SIMPLE_RETURN.
(gen_expand, gen_split): Use ANY_RETURN_P.
* df-scan.c (df_uses_record): Handle SIMPLE_RETURN.
* rtl.def (SIMPLE_RETURN): New code.
* ifcvt.c (find_if_case_1): Be more careful about
redirecting jumps to the EXIT_BLOCK.
* jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p,
returnjump_p_1): Handle SIMPLE_RETURNs.
* print-rtl.c (print_rtx): Likewise.
* rtl.c (copy_rtx): Likewise.
* bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P.
* combine.c (simplify_set): Likewise.
* resource.c (find_dead_or_set_registers, mark_set_resources):
Likewise.
* emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1,
copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs.
(init_emit_regs): Initialize simple_return_rtx.
* cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to
force_nonfallthru_and_redirect.
* rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN.
(GR_SIMPLE_RETURN): New enum value.
(simple_return_rtx): New macro.
* basic-block.h (force_nonfallthru_and_redirect): Adjust
declaration.
* cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label
argument. All callers changed. Be careful about what kinds of
returnjumps to generate.
* config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb,
ix86_pad_short_function): Likewise.
* config/arm/arm.c (arm_final_prescan_insn): Handle both kinds
of return.
* config/mips/mips.md (any_return): New code_iterator.
(optab): Add cases for return and simple_return.
(return): Expand to a simple_return.
(simple_return): New pattern.
(*<optab>, *<optab>_internal for any_return): New patterns.
(return_internal): Remove.
* config/mips/mips.c (mips_expand_epilogue): Make the last insn
a simple_return_internal.
From-SVN: r178135
* trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
if threadprivate.
* symbol.c (check_conflict): Allow threadprivate attribute with
FL_PROCEDURE if proc_pointer.
* testsuite/libgomp.fortran/threadprivate4.f90: New test.
From-SVN: r178114
PR c/50179
* c-typeck.c (c_process_expr_stmt): Skip over nops and
call mark_exp_read even if exprv is ADDR_EXPR.
* c-c++-common/Wunused-var-14.c: New test.
From-SVN: r178110
2011-08-26 Zdenek Dvorak <ook@ucw.cz>
Tom de Vries <tom@codesourcery.com>
* tree-ssa-loop-ivopts.c (struct cost_pair): Add comp field.
(struct ivopts_data): Add loop_single_exit_p field.
(niter_for_exit): Change parameter desc_p into return value. Return
desc if desc->may_be_zero. Free desc if unused.
(niter_for_single_dom_exit): Change return type.
(find_induction_variables): Handle changed return type of
niter_for_single_dom_exit. Dump may_be_zero.
(add_candidate_1): Keep original base and step type for IP_ORIGINAL.
(set_use_iv_cost): Add and handle comp parameter.
(determine_use_iv_cost_generic, determine_use_iv_cost_address): Add
comp argument to set_use_iv_cost.
(strip_wrap_conserving_type_conversions, expr_equal_p)
(difference_cannot_overflow_p, iv_elimination_compare_lt): New function.
(may_eliminate_iv): Add comp parameter. Handle new return type of
niter_for_exit. Use loop_single_exit_p. Use iv_elimination_compare_lt.
(determine_use_iv_cost_condition): Add comp argument to set_use_iv_cost
and may_eliminate_iv.
(rewrite_use_compare): Move call to iv_elimination_compare to ...
(may_eliminate_iv): Here.
(tree_ssa_iv_optimize_loop): Initialize loop_single_exit_p.
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r178104
2011-08-26 Tom de Vries <tom@codesourcery.com>
* tree-pretty-print (dump_generic_node): Test for NULL_TREE before
accessing TREE_TYPE.
From-SVN: r178103
* testsuite/libstdc++-prettyprinters/simple.cc: New file.
* testsuite/lib/gdb-test.exp: New file.
* testsuite/libstdc++-prettyprinters/prettyprinters.exp: New
file.
From-SVN: r178066
* regrename.c (scan_rtx_reg, scan_rtx_address, build_def_use,
dump_def_use_chain): Don't declare.
(mark_conflict, create_new_chain): Move before users.
(regrename_optimize): Move to near end of file.
From-SVN: r178065
* config/avr/avr.c (STR_PREFIX_P): New Define.
(avr_asm_declare_function_name): Use it.
(avr_asm_named_section): Use it.
(avr_section_type_flags): Use it.
From-SVN: r178062
2011-08-25 Andrew Haley <aph@redhat.com>
* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Remove hard-coded assembly
instructions.
* src/arm/sysv.S (ffi_arm_trampoline): Put them here instead.
From-SVN: r178060
* doc/md.texi (automata_option): Document collapse-ndfa.
* genautomata.c (COLLAPSE_OPTION): New macro.
(collapse_flag): New static variable.
(struct description): New member normal_decls_num.
(struct automaton): New members advance_ainsn and collapse_ainsn.
(gen_automata_option): Check for COLLAPSE_OPTION.
(collapse_ndfa_insn_decl): New static variable.
(add_collapse_ndfa_insn_decl, special_decl_p): New functions.
(find_arc): If insn is the collapse-ndfa insn, accept any arc we
find.
(transform_insn_regexps): Call add_collapse_ndfa_insn_decl if
necessary. Use normal_decls_num rather than decls_num, remove
test for special decls.
(create_alt_states, form_ainsn_with_same_reservs): Use
special_decl_p.
(make_automaton); Likewise. Use the new advance_cycle_insn member
of struct automaton.
(create_composed_state): Disallow advance-cycle arcs if collapse_flag
is set.
(NDFA_to_DFA): Don't create composed states for the collapse-ndfa
transition. Create the necessary transitions for it.
(create_ainsns): Return void. Take an automaton_t argument, and
update its ainsn_list, advance_ainsn and collapse_ainsn members. All
callers changed.
(COLLAPSE_NDFA_VALUE_NAME): New macro.
(output_tables): Output code to define it.
(output_internal_insn_code_evaluation): Output code to accept
const0_rtx as collapse-ndfa transition.
(output_default_latencies, output_print_reservation_func,
output_print_description): Reorganize loops to use normal_decls_num
as loop bound; remove special case for advance_cycle_insn_decl.
(initiate_automaton_gen): Handle COLLAPSE_OPTION.
(check_automata_insn_issues): Check for collapse_ainsn.
(expand_automate): Allocate sufficient space. Initialize
normal_decls_num.
From-SVN: r178059