* exp_util.adb (Make_CW_Equivalent_Type): Set the
Is_Class_Wide_Equivalent_Type flag here in lieu of...
(Make_Subtype_From_Expr): ...here.
* exp_ch3.adb (Expand_Freeze_Record_Type): Do not set
Has_Controlled_Component on class-wide equivalent types.
* freeze.adb (Freeze_Record_Type): Likewise.
* sem_ch3.adb (Record_Type_Definition): Likewise.
From-SVN: r154950
PR middle-end/42202
* regrename.c (live_in_chains): New variable.
(verify_reg_tracked): New static function.
(scan_rtx_reg): Update live_in_chains.
(scan_rtx): Only promote sets in COND_EXEC to OP_INOUT if
we're already tracking the reg.
(build_def_use): Likewise. Initialize live_in_chains.
From-SVN: r154944
Fix PR c++/42217
gcc/cp/ChangeLog
PR c++/42217
* class.c (remove_zero_width_bit_fields): The width of the bit field is
in DECL_SIZE, not in DECL_INITIAL.
gcc/testsuite/ChangeLog
PR c++/42217
* g++.dg/other/bitfield4.C: New test.
From-SVN: r154938
2009-12-02 Richard Guenther <rguenther@suse.de>
* fold-const.c (div_if_zero_remainder): Honor that sizetypes
are sign-extending. Simplify.
From-SVN: r154926
2009-12-02 Richard Guenther <rguenther@suse.de>
* lto-streamer-out.c (pack_ts_decl_common_value_fields):
Do not pretend we have value exprs.
From-SVN: r154921
2009-12-02 Richard Guenther <rguenther@suse.de>
PR middle-end/41491
* fold-const.c (try_move_mult_to_index): Do not leak
domain types into the IL.
From-SVN: r154920
* parser.c (cp_parser_class_specifier): Back out my previous change.
* semantics.c (begin_class_definition): Back out my previous change.
From-SVN: r154919
2009-12-02 Paolo Bonzini <bonzini@gnu.org>
Shujing Zhao <pearly.zhao@oracle.com>
PR c++/29917
* call.c (op_error): Accept a boolean to indicate no match/ambiguous
match, instead of a string. Callers adjusted.
PR c++/34836
* cp-tree.h (readonly_error_kind): New type.
(readonly_error): Adjust prototype with new argument.
* typeck2.c (readonly_error): Accept readonly_error_kind as argument
and add macro ERROR_FOR_ASSIGNMENT to emit diagnostics.
* semantics.c (finish_asm_stmt): Adjust readonly_error call.
* typeck.c (cp_build_unary_op, cp_build_modify_expr): Likewise.
* decl.c (grokparms, grok_op_properties): Put the diagnostics in full
sentences for easy translation and wrap the diagnostics into G_() when
needed.
(create_array_type_for_decl): Likewise.
* pt.c (tsubst): Likewise.
* typeck2.c (cp_build_unary_op): Wrap diagnostic into _().
* rtti.c (build_dynamic_cast_1): Likewise.
Co-Authored-By: Shujing Zhao <pearly.zhao@oracle.com>
From-SVN: r154915
* config/rx/rx.c (rx_conditional_register_usage): Do not warn if
no fixed registers are available for interrupt handlers. Do not
fix normal registers.
(MUST_SAVE_ACC_REGISTER): New macro.
(rx_get_stack_layout): Create a stack frame for fast interrupt
handlers, if necessary. Push extra registers if needed in order
to save the accumulator.
(rx_expand_prologue): Create a stack frame for fast interrupt
handlers, if necessary.
(rx_expand_builtin_mvfc): Handle the case where there is no
target.
From-SVN: r154903
* config/i386/abmintrin.h: New.
* config/i386/i386-c.c (ix86_target_macros_internal): Defined __ABM__.
* config/i386/x86intrin.h: Include abmintrin.h when __ABM__ is defined.
From-SVN: r154893
* src/powerpc/aix.S (ffi_call_AIX): Convert to more standard
register usage. Call ffi_prep_args directly. Add long double
return value support.
* src/powerpc/ffi_darwin.c (ffi_prep_args): Double arg increment
applies to FFI_TYPE_DOUBLE. Correct fpr_base increment typo.
Separate FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases.
(ffi_prep_cif_machdep): Only 16 byte stack alignment in 64 bit
mode.
(ffi_closure_helper_DARWIN): Remove nf and ng counters. Move temp
into case.
* src/powerpc/aix_closure.S: Maintain 16 byte stack alignment.
Allocate result area between params and FPRs.
From-SVN: r154892
* config/i386/i386.md (SWI124): Rename from CRC32MODE.
(crc32modesuffix): Remove.
(crc32modeconstraint): Ditto.
(sse4_2_crc32<mode>): Update for renamed mode iterator. Use
imodesuffix instead of crc32modesuffix and <r>m instead of
crc32modeconstraint.
From-SVN: r154882
PR c++/3187
* optimize.c (cdtor_comdat_group): New function.
(maybe_clone_body): Also optimize DECL_COMDAT base/complete cdtors
and in that case put also the deleting dtor in the same comdat group
as base and complete dtor if dtor is virtual.
From-SVN: r154880
2009-12-01 Grigori Fursin <grigori.fursin@inria.fr>
Joern Rennecke <amylaar@spamcop.net>
* cgraphunit.c (plugin.h): Include.
(ipa_passes): Invoke PLUGIN_ALL_IPA_PASSES_START /
PLUGIN_ALL_IPA_PASSES_END at start / end of processing.
* gcc-plugin.h (highlev-plugin-common.h, hashtab.h): Include.
(enum plugin_event): Define by including plugin.def.
Last enumerator is now called PLUGIN_EVENT_FIRST_DYNAMIC.
(plugin_event_name): Change type to const char **.
(get_event_last, get_named_event_id, unregister_callback): Declare.
(register_callback): Change type of event argument to int.
(highlev-plugin-common.h): New file.
* Makefile.in (GCC_PLUGIN_H): Add highlev-plugin-common.h and
$(HASHTAB_H)
(tree-optimize.o passes.o): Depend on $(PLUGIN_H).
(PLUGIN_HEADERS): Add opts.h, $(PARAMS_H) and plugin.def.
(s-header-vars): New rule.
(install-plugin): Depend on s-header-vars. Install b-header-vars.
* params.c (get_num_compiler_params): New function.
* params.h (get_num_compiler_params): Declare.
* passes.c (plugin.h): Include.
(make_pass_instance): Invoke PLUGIN_NEW_PASS.
(do_per_function_toporder, pass_init_dump_file): No longer static.
(pass_fini_dump_file): Likewise.
(execute_one_pass): Likewise. Invoke PLUGIN_OVERRIDE_GATE and
PLUGIN_PASS_EXECUTION.
(execute_ipa_pass_list): Invoke PLUGIN_EARLY_GIMPLE_PASSES_START and
PLUGIN_EARLY_GIMPLE_PASSES_END.
* plugin.c (plugin_event_name_init): New array, defined by
including plugin.def.
(FMT_FOR_PLUGIN_EVENT): Update.
(plugin_event_name): Change type to const char ** and initialize
to plugin_event_name_init.
(event_tab, event_last, event_horizon): New variable.
(get_event_last): New function.
(plugin_callbacks_init): New array.
(plugin_callbacks: Change type to struct callback_info **.
Initialize to plugin_callbacks_init.
(htab_event_eq, get_named_event_id, unregister_callback): New function.
(invoke_plugin_va_callbacks): Likewise.
(register_callback): Change type of event argument to int.
Handle new events. Allow dynamic events.
(invoke_plugin_callbacks): Likewise. Return success status.
(plugins_active_p): Allow dynamic callbacks.
* plugin.def: New file.
* plugin.h (invoke_plugin_callbacks): Update prototype.
(invoke_plugin_va_callbacks): Declare.
* tree-optimize.c (plugin.h): Include.
(tree_rest_of_compilation): Invoke PLUGIN_ALL_PASSES_START and
PLUGIN_ALL_PASSES_END.
* tree-pass.h (execute_one_pass, pass_init_dump_file): Declare.
(pass_fini_dump_file, do_per_function_toporder): Likewise.
* doc/plugin.texi: Document new event types.
Co-Authored-By: Joern Rennecke <amylaar@spamcop.net>
From-SVN: r154877
2009-12-01 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42237
* tree-sra.c (sra_ipa_modify_assign): Split gimple_reg_type assignments
in between references into two.
* testsuite/gcc.c-torture/compile/pr42237.c: New test.
From-SVN: r154874
2009-12-01 Richard Guenther <rguenther@suse.de>
* tree-inline.c (copy_tree_body_r): Do not set TREE_BLOCK
to the block of the call when remapping a type.
From-SVN: r154873