* 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
2009-12-01 Pascal Obry <obry@adacore.com>
* s-osprim-mingw.adb (Get_Base_Time): Make sure that the base time is
taken at a clock tick boundary.
From-SVN: r154871
2009-12-01 Thomas Quinot <quinot@adacore.com>
* g-sechas.ads (GNAT.Secure_Hashes.H."=" on Context): Make abstract.
2009-12-01 Matthew Gingell <gingell@adacore.com>
* adadecode.c: Allow compilation when building the run time in the gnat
runtime.
(__gnat_decode): Strip the .nnnn suffix from names of nested functions.
* gcc-interface/Makefile.in: Ada adadecode to LIBGNAT_SRCS and
LIBGNAT_OBJS.
2009-12-01 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): Quote the path names as they may include
spaces.
2009-12-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): If the defining identifier
has already been declared, it may have been rewritten as a renaming
declaration.
From-SVN: r154870
2009-12-01 Richard Guenther <rguenther@suse.de>
* final.c (rest_of_clean_state): If -fcompare-debug is
given dump final insns without UIDs.
* tree-ssa-live.c (remove_unused_scope_block_p): Remove
after_inlining checks.
From-SVN: r154869
2009-12-01 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: Clarify use of Is_Private_Primitive.
* sem_ch6.adb (Analyze_Subprogram_Declaration): An operation is a
private primitive operation only if it is declared in the scope of the
private controlling type.
* exp_ch9.adb (Build_Wrapper_Spec): Build wrappers for private
protected operations as well.
2009-12-01 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Disable front-end
optimizations in CodePeer mode, to keep the tree as close to the source
code as possible, and also to avoid inconsistencies between trees when
using different optimization switches.
2009-12-01 Thomas Quinot <quinot@adacore.com>
* scos.ads: Updated specification of source coverage obligation
information.
2009-12-01 Thomas Quinot <quinot@adacore.com>
* g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb,
a-ststio.adb, s-commun.adb, s-commun.ads, g-socket.adb,
g-socket.ads (System.Communications.Last_Index): For the case where no
element has been transferred and Item'First =
Stream_Element_Offset'First, raise CONSTRAINT_ERROR.
2009-12-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Install_Siblings): A private with_clause on some child
unit U in an ancestor of the current unit must be ignored if the
current unit has a regular with_clause on U.
From-SVN: r154868
gcc/ChangeLog:
2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com>
* configure.ac (USE_CYGWIN_LIBSTDCXX_WRAPPERS): Define to reflect
status of AC_CHECK_FUNC for Cygwin DLL libstdc++ support wrappers.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/cygwin.h (CXX_WRAP_SPEC_LIST): Define list of --wrap
options for Cygwin DLL libstdc++ support wrappers.
(CXX_WRAP_SPEC_OPT): Define spec to use wrappers or not by default
according to defined value of USE_CYGWIN_LIBSTDCXX_WRAPPERS.
(CXX_WRAP_SPEC): Define entire wrapper spec in or out according to
whether USE_CYGWIN_LIBSTDCXX_WRAPPERS is even defined or not.
(LINK_SPEC): Include CXX_WRAP_SPEC.
* gcc/config/i386/winnt.c (wrapper_strcmp): New qsort helper function.
(i386_find_on_wrapper_list): Check if a function is found on the list
of libstdc++ wrapper options.
(i386_pe_file_end): If we are importing a wrapped function, also emit
an external declaration for the real version.
* config/i386/cygming.opt (muse-libstdc-wrappers): New option for
Cygwin targets. Update copyright year.
libstdc++-v3/ChangeLog:
2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com>
* libstdc++-v3/acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Don't disable
on PE targets.
* libstdc++-v3/configure: Regenerate.
* libstdc++-v3/configure.host: Add libtool DLL options for Cygwin
and MinGW platforms.
* libstdc++-v3/include/bits/c++config (_GLIBCXX_VISIBILITY_ATTR): On
platforms that don't support visibility, allow them to declare a macro
_GLIBCXX_PSEUDO_VISIBILITY that is applied in place of visibility.
(_GLIBCXX_PSEUDO_VISIBILITY): Supply empty default if not declared by
CPU- or OS-specific headers.
* libstdc++-v3/config/os/newlib/os_defines.h
(_GLIBCXX_PSEUDO_VISIBILITY_default): New macro for dllimport.
(_GLIBCXX_PSEUDO_VISIBILITY_hidden): New empty macro.
(_GLIBCXX_PSEUDO_VISIBILITY): Evaluate to one of the above.
* libstdc++-v3/config/os/mingw32/os_defines.h
(_GLIBCXX_PSEUDO_VISIBILITY_default,
_GLIBCXX_PSEUDO_VISIBILITY_hidden,
_GLIBCXX_PSEUDO_VISIBILITY): Likewise.
From-SVN: r154853
cp/
2009-11-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/40371
* call.c (add_template_candidate_real): Early return NULL if
the arglist length is smaller than skip_without_in_chrg; tidy.
testsuite/
2009-11-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/40371
* g++.dg/template/crash93.C: New.
From-SVN: r154852
2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/42130
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
translate_clast_for_loop): New.
(translate_clast_for): Add a condition around the loop, to do not
execute loops with zero iterations.
* testsuite/g++.dg/graphite/pr42130.C: New.
* testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
From-SVN: r154849
2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite-clast-to-gimple.c (translate_clast_user,
translate_clast_for, translate_clast_guard): Simplify and move common
elements to translate_clast().
(translate_clast): Simplify and get common elements.
From-SVN: r154847
CLooG automatically frees the names list, so sharing SESE_PARAMS_NAMES
between gloog() and debug_generated_program() leads to freeing them
twice. As both SESE_PARAM_NAMES and SESE_PARAMS_INDEX are code
generation data structures remove them and the functions working on them
from sese.h and put them in clast-to-gimple.
2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
clast_name_to_index, save_clast_name_index, debug_clast_name_index,
debug_clast_name_indexes_1, debug_clast_name_indexes,
clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
(clast_name_to_gcc, clast_to_gcc_expression,
clast_to_gcc_expression_red, gcc_type_for_clast_expr,
gcc_type_for_clast_eq, graphite_translate_clast_equation,
graphite_create_guard_cond_expr, graphite_create_new_loop,
translate_clast): Add params_index.
(initialize_cloog_names): Create parameter strings from scratch, do
not reference other strings.
(create_params_index): New.
(gloog): Initialize params_index.
* graphite-scop-detection (free_scops_1): Removed.
(limit_scops): Use normal free_scops.
* graphite-sese-to-poly.c (save_var_names): Removed.
(parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
and SESE_PARAMS_INDEX.
* sese.c (new_sese, free_sese): Dito.
* sese.h (struct sese): Remove params_index, params_names.
(SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
From-SVN: r154844
2009-11-30 Steve Ellcey <sje@cup.hp.com>
Jakub Jelinek <jakub@redhat.com>
* function.c (instantiate_virtual_regs_in_insn): Copy to new reg
before forcing mode.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r154843
merge from fortran-dev branch:
gcc/fortran/
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/42053
* resolve.c (resolve_select_type): Check for duplicate CLASS IS blocks.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/41631
* decl.c (gfc_match_derived_decl): Set extension level.
* gfortran.h (symbol_attribute): Expand 'extension' bit field to 8 bit.
* iresolve.c (gfc_resolve_extends_type_of): Return value of
'is_extension_of' has kind=4.
* match.c (select_type_set_tmp,gfc_match_class_is): Create temporary
for CLASS IS blocks.
* module.c (MOD_VERSION): Bump module version.
(ab_attribute,attr_bits): Remove AB_EXTENSION.
(mio_symbol_attribute): Handle expanded 'extension' field.
* resolve.c (resolve_select_type): Implement CLASS IS blocks.
(resolve_fl_variable_derived): Show correct type name.
* symbol.c (gfc_build_class_symbol): Set extension level.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
* intrinsic.h (gfc_resolve_extends_type_of): Add prototype.
* intrinsic.c (add_functions): Use 'gfc_resolve_extends_type_of'.
* iresolve.c (gfc_resolve_extends_type_of): New function, which
replaces the call to EXTENDS_TYPE_OF by the library function
'is_extension_of' and modifies the arguments.
* trans-intrinsic.c (gfc_conv_extends_type_of): Removed.
(gfc_conv_intrinsic_function): FOR EXTENDS_TYPE_OF, don't call
gfc_conv_extends_type_of but gfc_conv_intrinsic_funcall.
2009-11-30 Paul Thomas <pault@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
* decl.c (encapsulate_class_symbol): Replaced by
'gfc_build_class_symbol'.
(build_sym,build_struct): Call 'gfc_build_class_symbol'.
(gfc_match_derived_decl): Replace vindex by hash_value.
* dump-parse-tree.c (show_symbol): Replace vindex by hash_value.
* gfortran.h (symbol_attribute): Add field 'vtab'.
(gfc_symbol): Replace vindex by hash_value.
(gfc_class_esym_list): Ditto.
(gfc_get_derived_type,gfc_build_class_symbol,gfc_find_derived_vtab):
New prototypes.
* module.c (mio_symbol): Replace vindex by hash_value.
* resolve.c (vindex_expr): Rename to 'hash_value_expr'.
(resolve_class_compcall,resolve_class_typebound_call): Renamed
'vindex_expr'.
(resolve_select_type): Replace $vindex by $vptr->$hash.
* symbol.c (gfc_add_save): Handle vtab symbols.
(gfc_type_compatible): Rewrite.
(gfc_build_class_symbol): New function which replaces
'encapsulate_class_symbol'.
(gfc_find_derived_vtab): New function to set up a vtab symbol for a
derived type.
* trans-decl.c (gfc_create_module_variable): Handle vtab symbols.
* trans-expr.c (select_class_proc): Replace vindex by hash_value.
(gfc_conv_derived_to_class): New function to construct a temporary
CLASS variable from a derived type expression.
(gfc_conv_procedure_call): Call 'gfc_conv_derived_to_class'.
(gfc_conv_structure): Initialize the $extends and $size fields of
vtab symbols.
(gfc_trans_class_assign): Replace $vindex by $vptr. Remove the $size
assignment.
* trans-intrinsic.c (gfc_conv_same_type_as): Replace $vindex by
$vptr->$hash, and replace vindex by hash_value.
* trans-stmt.c (gfc_trans_allocate): Insert $vptr references, replace
$vindex by $vptr. Remove the $size assignment.
* trans-types.c (gfc_get_derived_type): Make it non-static.
gcc/testsuite/
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/42053
* gfortran.dg/select_type_9.f03: New.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/41631
* gfortran.dg/extends_type_of_1.f03: Fix invalid test case.
* gfortran.dg/module_md5_1.f90: Adjusted MD5 sum.
* gfortran.dg/select_type_1.f03: Remove FIXMEs.
* gfortran.dg/select_type_2.f03: Ditto.
* gfortran.dg/select_type_8.f03: New test.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
* gfortran.dg/extends_type_of_1.f03: New test.
* gfortran.dg/same_type_as_1.f03: Extended.
2009-11-30 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/class_4c.f03: Add dg-additional-sources.
* gfortran.dg/class_4d.f03: Rename module. Cleanup modules.
libgfortran/
2009-11-30 Janus Weil <janus@gcc.gnu.org>
* gfortran.map: Add _gfortran_is_extension_of.
* Makefile.am: Add intrinsics/extends_type_of.c.
* Makefile.in: Regenerated.
* intrinsics/extends_type_of.c: New file.
From-SVN: r154840