From 91c756e66b7d9978a4b416fe607669dbe15dd313 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sat, 11 Jul 2009 19:33:14 +0000 Subject: * gcc-interface/ada-tree.h: Minor reorganization. * gcc-interface/misc.c (gnat_print_decl): Minor tweaks. (gnat_print_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149518 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index fb306206fc1..587eab3379e 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -470,17 +470,17 @@ gnat_print_decl (FILE *file, tree node, int indent) switch (TREE_CODE (node)) { case CONST_DECL: - print_node (file, "const_corresponding_var", + print_node (file, "corresponding var", DECL_CONST_CORRESPONDING_VAR (node), indent + 4); break; case FIELD_DECL: - print_node (file, "original_field", DECL_ORIGINAL_FIELD (node), + print_node (file, "original field", DECL_ORIGINAL_FIELD (node), indent + 4); break; case VAR_DECL: - print_node (file, "renamed_object", DECL_RENAMED_OBJECT (node), + print_node (file, "renamed object", DECL_RENAMED_OBJECT (node), indent + 4); break; @@ -497,7 +497,7 @@ gnat_print_type (FILE *file, tree node, int indent) switch (TREE_CODE (node)) { case FUNCTION_TYPE: - print_node (file, "ci_co_list", TYPE_CI_CO_LIST (node), indent + 4); + print_node (file, "ci/co list", TYPE_CI_CO_LIST (node), indent + 4); break; case INTEGER_TYPE: -- cgit v1.2.1 From bfec3452cfb96a7546809ee1af3fffb9eba9d658 Mon Sep 17 00:00:00 2001 From: rguenth Date: Fri, 17 Jul 2009 15:49:34 +0000 Subject: 2009-07-17 Richard Guenther PR c/40401 * tree-pass.h (pass_diagnose_omp_blocks): Declare. (pass_warn_unused_result): Likewise. (TODO_set_props): Remove. * omp-low.c (diagnose_omp_structured_block_errors): Change to run as a pass. (pass_diagnose_omp_blocks): Define. * c-decl.c (pop_file_scope): Do not finalize the CU here. (c_gimple_diagnostics_recursively): Remove. (finish_function): Do not call it. (c_write_global_declarations): Continue after errors. Finalize the CU here. * c-gimplify.c (c_genericize): Do not gimplify here. * c-common.c (c_warn_unused_result): Move ... * tree-cfg.c (do_warn_unused_result): ... here. (run_warn_unused_result): New function. (gate_warn_unused_result): New function. (pass_warn_unused_result): New pass. * c-common.h (c_warn_unused_result): Remove. * flags.h (flag_warn_unused_result): Declare. * c-opts.c (c_common_init_options): Enable flag_warn_unused_result. * opts.c (flag_warn_unused_result): Initialize to false. * toplev.c (compile_file): Add comment. * omp-low.c (create_omp_child_function): Do not register the function with the frontend. (diagnose_omp_structured_block_errors): Prepare to be called as optimization pass. (gate_diagnose_omp_blocks): New function. (pass_diagnose_omp_blocks): New pass. * cgraph.h (cgraph_optimize): Remove. (cgraph_analyze_function): Likewise. * cgraph.c (cgraph_add_new_function): Gimplify C++ thunks. * cgraphunit.c (cgraph_lower_function): Lower nested functions before their parents here. (cgraph_finalize_function): Not here. (cgraph_analyze_function): Gimplify functions here. (cgraph_finalize_compilation_unit): Continue after errors. Optimize the callgraph from here. (cgraph_optimize): Make static. * langhooks.c (write_global_declarations): Finalize the CU. * gimplify.c (gimplify_asm_expr): Do not emit ASMs with errors. (gimplify_function_tree): Assert we gimplify only once. Set PROP_gimple_any property. * tree-nested.c (gimplify_all_functions): New function. (lower_nested_functions): Gimplify all nested functions. * gimple.h (diagnose_omp_structured_block_errors): Remove. * passes.c (init_optimization_passes): Add pass_warn_unused_result and pass_diagnose_omp_blocks after gimplification. Do not set TODO_set_props on all_lowering_passes. (execute_one_pass): Do not handle TODO_set_props. * Makefile.in (cgraphunit.o): Add $(TREE_DUMP_H) dependency. (gimplify.o): Add tree-pass.h dependency. * tree-inline.c (copy_statement_list): Properly copy STATEMENT_LIST. (copy_tree_body_r): Properly handle TARGET_EXPR like SAVE_EXPR. (unsave_r): Likewise. * c-omp.c (c_finish_omp_atomic): Set DECL_CONTEXT on the temporary variable. cp/ * decl.c (finish_function): Do not emit unused result warnings from here. * cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use c_warn_unused_result_pass. * semantics.c (expand_or_defer_fn): Adjust assertion about IL status. * optimize.c (clone_body): Clone in GENERIC. (maybe_clone_body): Do not clear DECL_SAVED_TREE. * decl2.c (cp_write_global_declarations): Fix body test. Do not call cgraph_optimize. * Make-lang.in (optimize.o): Add tree-iterator.h dependency. * method.c (use_thunk): Register thunk with cgraph_finalize_function. * error.c (function_category): Guard access of DECL_LANG_SPECIFIC. java/ * java-gimplify.c (java_genericize): Do not gimplify here. But replace all local references. (java_gimplify_expr): Do not replace local references here. (java_gimplify_modify_expr): Likewise. * jcf-parse.c (java_parse_file): Do not finalize the CU or optimize the cgraph here. * decl.c (java_replace_reference): Make static. (java_replace_references): New function. (end_java_method): Clear base_decl_map. * java-tree.h (java_replace_references): Declare. (java_replace_reference): Remove. ada/ * utils.c (end_subprog_body): Revert to pre-tuples state. Remove unused parameter. (gnat_gimplify_function): Do not gimplify here. Fold into its only caller and remove. (gnat_builtin_function): Adjust for end_subprog_body signature change. (gnat_write_global_declarations): Also finalize the CU. * misc.c (gnat_parse_file): Do not finalize the CU here. * trans.c (gigi): Revert to pre-tuples state. (Subprogram_Body_to_gnu): Adjust for end_subprog_body signature change. * gigi.h (end_subprog_body): Remove unused parameter. fortran/ * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here. * trans-decl.c (gfc_gimplify_function): Remove. (build_entry_thunks): Do not gimplify here. (create_main_function): Likewise. (gfc_generate_function_code): Likewise. * g++.dg/rtti/crash4.C: New testcase. * g++.dg/torture/20090706-1.C: Likewise. * gcc.dg/redecl-17.c: Likewise. * gfortran.dg/missing_optional_dummy_5.f90: Adjust pattern. * gcc.dg/declspec-9.c: Expect extra error. * gcc.dg/declspec-10.c: Likewise. * gcc.dg/declspec-11.c: Likewise. * gcc.dg/redecl-10.c: Expect extra warnings. * gcc.target/i386/pr39082-1.c: Adjust diagnostic location. * gcc.target/i386/pr39545-1.c: Likewise. * g++.dg/ext/asm3.C: Expect more errors. * g++.dg/gomp/block-1.C: Likewise. * g++.dg/gomp/block-2.C: Likewise. * g++.dg/gomp/block-3.C: Likewise. * g++.dg/gomp/block-5.C: Likewise. * g++.old-deja/g++.jason/report.C: Expect extra warnings. * g++.dg/warn/unused-result1.C: XFAIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149750 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 587eab3379e..4b68227e3cd 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -176,9 +176,6 @@ gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED) /* Call the front end. */ _ada_gnat1drv (); - - /* We always have a single compilation unit in Ada. */ - cgraph_finalize_compilation_unit (); } /* Decode all the language specific options that cannot be decoded by GCC. -- cgit v1.2.1 From 7cdef07ddbd119bb6217a5b85e46d540bac5b228 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Thu, 20 Aug 2009 14:04:30 +0000 Subject: * gcc-interface/ada-tree.h (SET_TYPE_RM_VALUE): Mark the expression as visited. * gcc-interface/misc.c (gnat_get_subrange_bounds): Always return the bounds. * gcc-interface/trans.c (add_decl_expr): Do not mark gigi-specific fields. (gnat_gimplify_expr) : New case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150963 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 4b68227e3cd..cc9eeaa8035 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -656,14 +656,8 @@ gnat_type_max_size (const_tree gnu_type) static void gnat_get_subrange_bounds (const_tree gnu_type, tree *lowval, tree *highval) { - tree min = TYPE_MIN_VALUE (gnu_type); - tree max = TYPE_MAX_VALUE (gnu_type); - /* If the bounds aren't constant, use non-representable constant values - to get the same effect on debug info without tree sharing issues. */ - *lowval - = TREE_CONSTANT (min) ? min : build_int_cstu (integer_type_node, -1); - *highval - = TREE_CONSTANT (max) ? max : build_int_cstu (integer_type_node, -1); + *lowval = TYPE_MIN_VALUE (gnu_type); + *highval = TYPE_MAX_VALUE (gnu_type); } /* GNU_TYPE is a type. Determine if it should be passed by reference by -- cgit v1.2.1 From f639fdbff97b434f0ee9d6d2f03b6c5483efbed2 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 1 Sep 2009 08:38:10 +0000 Subject: 2009-09-01 Richard Guenther * tree-flow.h (mark_addressable): Move declaration ... * tree.h (mark_addressable): ... here. * stmt.c (expand_asm_operands): Use mark_addressable, not lang_hooks.mark_addressable. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_MARK_ADDRESSABLE. * langhooks.h (struct lang_hooks): Remove mark_addressable langhook. * c-objc-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove. ada/ * gcc-interface/misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. cp/ * cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove. fortran/ * f95-lang.c (gfc_mark_addressable): Remove. (LANG_HOOKS_MARK_ADDRESSABLE): Likewise. java/ * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove. * java-tree.h (java_mark_addressable): Likewise. * typeck.c (java_mark_addressable): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151260 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index cc9eeaa8035..46e762feeb3 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -106,8 +106,6 @@ static void gnat_get_subrange_bounds (const_tree, tree *, tree *); #define LANG_HOOKS_WRITE_GLOBALS gnat_write_global_declarations #undef LANG_HOOKS_GET_ALIAS_SET #define LANG_HOOKS_GET_ALIAS_SET gnat_get_alias_set -#undef LANG_HOOKS_MARK_ADDRESSABLE -#define LANG_HOOKS_MARK_ADDRESSABLE gnat_mark_addressable #undef LANG_HOOKS_PRINT_DECL #define LANG_HOOKS_PRINT_DECL gnat_print_decl #undef LANG_HOOKS_PRINT_TYPE -- cgit v1.2.1 From 34e5cced0545b23499caed535a6566a4026b9558 Mon Sep 17 00:00:00 2001 From: dnovillo Date: Thu, 3 Sep 2009 04:07:12 +0000 Subject: 2009-09-01 Diego Novillo * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther Diego Novillo * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin Rafael Espindola Richard Guenther Doug Kwan Diego Novillo * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151360 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 46e762feeb3..f39a60eb4cc 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -131,7 +131,7 @@ static void gnat_get_subrange_bounds (const_tree, tree *, tree *); #undef LANG_HOOKS_BUILTIN_FUNCTION #define LANG_HOOKS_BUILTIN_FUNCTION gnat_builtin_function -const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; +struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; /* How much we want of our DWARF extensions. Some of our dwarf+ extensions are incompatible with regular GDB versions, so we must make sure to only -- cgit v1.2.1 From 58d82cd04d30e16e38e5fcac6d2d120fa55d64ed Mon Sep 17 00:00:00 2001 From: rguenth Date: Sun, 13 Sep 2009 19:40:33 +0000 Subject: 2009-09-13 Richard Guenther Rafael Avila de Espindola * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (LANG_HOOKS_INITIALIZER): Adjust. (lhd_pass_through_t): Declare. * langhooks.h (struct lang_hooks): Add eh_runtime_type and eh_personality. * langhooks.c (lhd_pass_through_t): New function. * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc, dwarf2out_begin_prologue): Use personality from current_function_decl. * expr.h (get_personality_function): Declare. * expr.c (get_personality_function): New function. (build_personality_function): Likewise. * libfuncs.h (libfunc_index): Remove LTI_eh_personality. (eh_personality_libfunc): Remove. * optabs.c (build_libfunc_function): New function split out from ... (init_one_libfunc): ... here. * tree.h (DECL_FUNCTION_PERSONALITY): New. (tree_function_decl): Add personality. (lhd_gcc_personality): Declare. (build_personality_function): Likewise. * tree.c (gcc_eh_personality_decl): New. (lhd_gcc_personality): New function. * except.h (lang_eh_runtime_type): Remove. (enum eh_personality_kind): New. (build_personality_function): Declare. (function_needs_eh_personality): Declare. * except.c (lang_eh_runtime_type): Remove. (function_needs_eh_personality): New function. (add_type_for_runtime): Call lang_hooks.type_for_runtime instead. (sjlj_emit_function_enter, output_function_exception_table): Use personality from current_function_decl. * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY. * tree-inline.c (tree_can_inline_p): Do not inline across different EH personalities. (expand_call_inline): Likewise. Adjust the callers EH personality. (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY. * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY. * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency. (c-parser.o): Likewise * c-tree.h (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh. (finish_decl): Don't call c_maybe_initialize_eh. (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-parser.c (c_parser_omp_construct): Likewise. (c_parse_file): Initialize exception handling. objc/ * objc-act.c (objc_eh_runtime_type): Export. (objc_init_exceptions): Remove. Move warning code ... (objc_begin_try_stmt): ... here (objc_build_throw_stmt): ... and here. (objc_eh_personality_decl): New. (objc_eh_personality): New function. * objc-act.h (objc_eh_runtime_type): Declare. (objc_eh_personality): Likewise. * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. cp/ * except.c (init_exception_processing): Do not set lang_eh_runtime_type. (choose_personality_routine): Do not set eh_personality_decl, set pragma_java_exceptions. * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (cp_eh_personality_decl): New. (cp_eh_personality): Likewise. * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H) dependencies. java/ * decl.c (do_nothing): Remove. (java_init_decl_processing): Do not set lang_eh_runtime_type. * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency. * lang.c (java_eh_personality): New. (java_eh_personality_decl): Likewise. (LANG_HOOKS_EH_PERSONALITY): Define. ada/ * gcc-interface/misc.c (gnat_init_gcc_eh): Do not set lang_eh_runtime_type. (LANG_HOOKS_EH_PERSONALITY): Define. (gnat_eh_personality_decl): New. (gnat_eh_personality): Likewise. * Make-lang.in (misc.o): Add gt-ada-misc.h dependency. * config-lang.in (gtfiles): Add misc.c. fortran/ * f95-lang.c (gfc_maybe_initialize_eh): Do not init eh_personality_libfunc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151676 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index f39a60eb4cc..261351f840c 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -79,6 +79,7 @@ static void gnat_parse_file (int); static void internal_error_function (const char *, va_list *); static tree gnat_type_max_size (const_tree); static void gnat_get_subrange_bounds (const_tree, tree *, tree *); +static tree gnat_eh_personality (void); /* Definitions for our language-specific hooks. */ @@ -129,7 +130,9 @@ static void gnat_get_subrange_bounds (const_tree, tree *, tree *); #undef LANG_HOOKS_ATTRIBUTE_TABLE #define LANG_HOOKS_ATTRIBUTE_TABLE gnat_internal_attribute_table #undef LANG_HOOKS_BUILTIN_FUNCTION -#define LANG_HOOKS_BUILTIN_FUNCTION gnat_builtin_function +#define LANG_HOOKS_BUILTIN_FUNCTION gnat_builtin_function +#undef LANG_HOOKS_EH_PERSONALITY +#define LANG_HOOKS_EH_PERSONALITY gnat_eh_personality struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; @@ -431,11 +434,7 @@ gnat_init_gcc_eh (void) right exception regions. */ using_eh_for_cleanups (); - eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS - ? "__gnat_eh_personality_sj" - : "__gnat_eh_personality"); lang_eh_type_covers = gnat_eh_type_covers; - lang_eh_runtime_type = gnat_return_tree; default_init_unwind_resume_libfunc (); /* Turn on -fexceptions and -fnon-call-exceptions. The first one triggers @@ -811,3 +810,19 @@ fp_size_to_prec (int size) gcc_unreachable (); } + +static GTY(()) tree gnat_eh_personality_decl; + +static tree +gnat_eh_personality (void) +{ + if (!gnat_eh_personality_decl) + gnat_eh_personality_decl + = build_personality_function (USING_SJLJ_EXCEPTIONS + ? "__gnat_eh_personality_sj" + : "__gnat_eh_personality"); + + return gnat_eh_personality_decl; +} + +#include "gt-ada-misc.h" -- cgit v1.2.1 From e38def9ca7953bb5611d08ce8617249516ba5a99 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 14 Sep 2009 19:18:58 +0000 Subject: Squash commit of EH in gimple git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151696 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 261351f840c..26df68de581 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -435,7 +435,6 @@ gnat_init_gcc_eh (void) using_eh_for_cleanups (); lang_eh_type_covers = gnat_eh_type_covers; - default_init_unwind_resume_libfunc (); /* Turn on -fexceptions and -fnon-call-exceptions. The first one triggers the generation of the necessary exception runtime tables. The second one -- cgit v1.2.1 From 52dd2567ac48cb51c319cbca5a3075a786f04d61 Mon Sep 17 00:00:00 2001 From: hainque Date: Fri, 25 Sep 2009 09:33:17 +0000 Subject: ada/ * gcc-interface/ada-tree.h (TYPE_REPRESENTATIVE_ARRAY): New language specific node. Representative array type for VECTOR_TYPE entities. * gcc-interface/utils.c (handle_vector_type_attribute): New handler. Turn an ARRAY_TYPE entity into a VECTOR_TYPE. (gnat_types_compatible_p): Handle VECTOR_TYPEs. (convert): Likewise. Arrange to produce VECTOR_CST out of constant array aggregates for VECTOR_TYPE entities. (unchecked_convert): Likewise. (maybe_vector_array): New function. If EXP has VECTOR_TYPE, return EXP converted to the associated TYPE_REPRESENTATIVE_ARRAY. (handle_pure_attribute, handle_sentinel_attribute, handle_noreturn_attribute, handle_malloc_attribute, handle_vector_size_attribute): Replace uses of qE format by qs. Remove GCC_DIAG_STYLE definition. * gcc-interface/trans.c (gnat_to_gnu) : Convert vector input to representative array type on entry. : Likewise. * gcc-interface/gigi.h (maybe_vector_array): Declare. (VECTOR_TYPE_P): New predicate. * gcc-interface/misc.c (gnat_print_type): Handle VECTOR_TYPE. testsuite/ * gnat.dg/sse_nolib.adb: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152165 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 26df68de581..67823789ab3 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -521,6 +521,11 @@ gnat_print_type (FILE *file, tree node, int indent) print_node (file,"actual bounds", TYPE_ACTUAL_BOUNDS (node), indent + 4); break; + case VECTOR_TYPE: + print_node (file,"representative array", + TYPE_REPRESENTATIVE_ARRAY (node), indent + 4); + break; + case RECORD_TYPE: if (TYPE_IS_FAT_POINTER_P (node) || TYPE_CONTAINS_TEMPLATE_P (node)) print_node (file, "unconstrained array", -- cgit v1.2.1 From a98f6becc1a2d108e170f816c1a9aebb3cb618df Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 16 Oct 2009 20:07:52 +0000 Subject: * gcc-interface/ada-tree.h (TYPE_FAT_POINTER_P): Swap with... (TYPE_IS_FAT_POINTER_P): ...this. (TYPE_THIN_POINTER_P): Rename into... (TYPE_IS_THIN_POINTER_P): ...this. (TYPE_FAT_OR_THIN_POINTER_P): Rename into... (TYPE_IS_FAT_OR_THIN_POINTER_P): ...this. (TYPE_IS_PADDING_P): Change definition, move old one to... (TYPE_PADDING_P): ...this. * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for above changes. (get_unpadded_type): Likewise. (gnat_to_gnu_component_type): Likewise. (gnat_to_gnu_param): Likewise. (relate_alias_sets): Likewise. (make_packable_type): Likewise. (maybe_pad_type): Likewise. (gnat_to_gnu_field): Likewise. (is_variable_size): Likewise. (annotate_object): Likewise. (validate_size): Likewise. (set_rm_size): Likewise. (make_type_from_size): Likewise. (rm_size): Likewise. * gcc-interface/misc.c (gnat_print_type): Likewise. (gnat_get_alias_set): Likewise. * gcc-interface/trans.c (Identifier_to_gnu): Likewise. (Attribute_to_gnu): Likewise. (call_to_gnu): Likewise. (gnat_to_gnu): Likewise. (add_decl_expr): Likewise. (convert_with_check): Likewise. (addressable_p): Likewise. (maybe_implicit_deref): Likewise. (protect_multiple_eval): Likewise. (gnat_stabilize_reference_1): Likewise. * gcc-interface/utils.c (gnat_pushdecl): Likewise. (finish_record_type): Likewise. (rest_of_record_type_compilation): Likewise. (create_type_decl): Likewise. (gnat_types_compatible_p): Likewise. (build_template): Likewise. (convert_vms_descriptor64): Likewise. (convert_vms_descriptor32): Likewise. (build_unc_object_type_from_ptr): Likewise. (update_pointer_to): Likewise. (convert_to_fat_pointer): Likewise. (convert_to_fat_pointer): Likewise. (convert): Likewise. (remove_conversions): Likewise. (maybe_unconstrained_array): Likewise. (unchecked_convert): Likewise. (handle_vector_type_attribute): Likewise. * gcc-interface/utils2.c (build_binary_op): Likewise. (build_unary_op): Likewise. (build_allocator): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152917 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 67823789ab3..570bd111a95 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -527,7 +527,7 @@ gnat_print_type (FILE *file, tree node, int indent) break; case RECORD_TYPE: - if (TYPE_IS_FAT_POINTER_P (node) || TYPE_CONTAINS_TEMPLATE_P (node)) + if (TYPE_FAT_POINTER_P (node) || TYPE_CONTAINS_TEMPLATE_P (node)) print_node (file, "unconstrained array", TYPE_UNCONSTRAINED_ARRAY (node), indent + 4); else @@ -600,8 +600,7 @@ static alias_set_type gnat_get_alias_set (tree type) { /* If this is a padding type, use the type of the first field. */ - if (TREE_CODE (type) == RECORD_TYPE - && TYPE_IS_PADDING_P (type)) + if (TYPE_IS_PADDING_P (type)) return get_alias_set (TREE_TYPE (TYPE_FIELDS (type))); /* If the type is an unconstrained array, use the type of the -- cgit v1.2.1 From e568189fbcf2b6e91fd5928a44498540fe2ed5a8 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Tue, 13 Apr 2010 07:08:24 +0000 Subject: * gimple.c (walk_gimple_op) : Do not request a pure rvalue on the RHS if the LHS is of a non-renamable type. * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Fold result. ada/ * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete. (DECL_CONST_ADDRESS_P): New macro. (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise. (SAME_FIELD_P): Likewise. * gcc-interface/decl.c (constructor_address_p): New static function. (gnat_to_gnu_entity) : Set DECL_CONST_ADDRESS_P according to the return value of above function. (gnat_to_gnu_entity) : Force BLKmode for all types passed by reference. : Likewise. Set TREE_ADDRESSABLE on the type if it passed by reference. (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD. (create_field_decl_from): Likewise. (substitute_in_type): Likewise. (purpose_member_field): Use SAME_FIELD_P. * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE. * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT parameter and adjust recursive calls. : New case. : Return 1 if the object is of a class-wide type. Adjust calls to lvalue_required_p. Do not return the initializer of a DECL_CONST_ADDRESS_P constant if an lvalue is required for it. (call_to_gnu): Delay issuing error message for a misaligned actual and avoid the associated back-end assertion. Test TREE_ADDRESSABLE. (gnat_gimplify_expr) : Handle non-static constructors. * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the type is passed by reference. (convert) : Convert in-place in more cases. * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P. (build_simple_component_ref): Use SAME_FIELD_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158254 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 570bd111a95..8c647d35972 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -700,7 +700,7 @@ must_pass_by_ref (tree gnu_type) and does not produce compatibility problems with C, since C does not have such objects. */ return (TREE_CODE (gnu_type) == UNCONSTRAINED_ARRAY_TYPE - || (AGGREGATE_TYPE_P (gnu_type) && TYPE_BY_REFERENCE_P (gnu_type)) + || TREE_ADDRESSABLE (gnu_type) || (TYPE_SIZE (gnu_type) && TREE_CODE (TYPE_SIZE (gnu_type)) != INTEGER_CST)); } -- cgit v1.2.1 From 493106f66ff610b15fb855a85ba53fea69d322a8 Mon Sep 17 00:00:00 2001 From: baldrick Date: Tue, 13 Apr 2010 09:21:12 +0000 Subject: Remove lang_eh_type_covers, which is dead, and the corresponding Ada routine gnat_eh_type_covers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158258 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 8c647d35972..dbeabc0eca5 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -74,7 +74,6 @@ static void gnat_print_type (FILE *, tree, int); static const char *gnat_printable_name (tree, int); static const char *gnat_dwarf_name (tree, int); static tree gnat_return_tree (tree); -static int gnat_eh_type_covers (tree, tree); static void gnat_parse_file (int); static void internal_error_function (const char *, va_list *); static tree gnat_type_max_size (const_tree); @@ -434,8 +433,6 @@ gnat_init_gcc_eh (void) right exception regions. */ using_eh_for_cleanups (); - lang_eh_type_covers = gnat_eh_type_covers; - /* Turn on -fexceptions and -fnon-call-exceptions. The first one triggers the generation of the necessary exception runtime tables. The second one is useful for two reasons: 1/ we map some asynchronous signals like SEGV @@ -580,20 +577,6 @@ gnat_return_tree (tree t) return t; } -/* Return true if type A catches type B. Callback for flow analysis from - the exception handling part of the back-end. */ - -static int -gnat_eh_type_covers (tree a, tree b) -{ - /* a catches b if they represent the same exception id or if a - is an "others". - - ??? integer_zero_node for "others" is hardwired in too many places - currently. */ - return (a == b || a == integer_zero_node); -} - /* Get the alias set corresponding to a type or expression. */ static alias_set_type -- cgit v1.2.1 From 22582d866a933d4686e2c5068353b2083f84932a Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 16 Apr 2010 15:04:26 +0000 Subject: * gcc-interface/gigi.h (gnat_init_decl_processing): Delete. * gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables. : Do not create the fake PARM_DECL if no debug info is needed. Do not create the corresponding VAR_DECL of a CONST_DECL for debugging purposes if no debug info is needed. Fix formatting. Reorder and add comments. * gcc-interface/trans.c (gnat_to_gnu) : Constify variable and remove obsolete comment. * gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment. (convert_vms_descriptor32): Likewise. (convert): Remove dead code. : Pass the field instead of its name to build the reference to the P_ARRAY pointer. : Likewise. (maybe_unconstrained_array) : Likewise. (gnat_init_decl_processing): Delete, move contents to... * gcc-interface/misc.c (gnat_init): ...here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158428 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index dbeabc0eca5..1b31890f32c 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -388,9 +388,31 @@ internal_error_function (const char *msgid, va_list *ap) static bool gnat_init (void) { - /* Performs whatever initialization steps needed by the language-dependent - lexical analyzer. */ - gnat_init_decl_processing (); + /* Do little here, most of the standard declarations are set up after the + front-end has been run. */ + build_common_tree_nodes (true, true); + + /* In Ada, we use a signed type for SIZETYPE. Use the signed type + corresponding to the width of Pmode. In most cases when ptr_mode + and Pmode differ, C will use the width of ptr_mode for SIZETYPE. + But we get far better code using the width of Pmode. */ + size_type_node = gnat_type_for_mode (Pmode, 0); + set_sizetype (size_type_node); + + /* In Ada, we use an unsigned 8-bit type for the default boolean type. */ + boolean_type_node = make_unsigned_type (8); + TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE); + SET_TYPE_RM_MAX_VALUE (boolean_type_node, + build_int_cst (boolean_type_node, 1)); + SET_TYPE_RM_SIZE (boolean_type_node, bitsize_int (1)); + + build_common_tree_nodes_2 (0); + boolean_true_node = TYPE_MAX_VALUE (boolean_type_node); + + ptr_void_type_node = build_pointer_type (void_type_node); + + /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ + internal_reference_types (); /* Add the input filename as the last argument. */ if (main_input_filename) @@ -400,11 +422,9 @@ gnat_init (void) gnat_argv[gnat_argc] = NULL; } + /* Register our internal error function. */ global_dc->internal_error = &internal_error_function; - /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ - internal_reference_types (); - return true; } -- cgit v1.2.1 From 3fa661c420a097dd38a7a231c5df9b0a8b8a28ec Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sat, 17 Apr 2010 08:14:08 +0000 Subject: * gcc-interface/gigi.h (enum standard_datatypes): Add new values ADT_sbitsize_one_node and ADT_sbitsize_unit_node. (sbitsize_one_node): New macro. (sbitsize_unit_node): Likewise. * gcc-interface/decl.c (gnat_to_gnu_entity) : Fix latent bug in the computation of subrange_p. Fold wider_p predicate. (cannot_be_superflat_p): Use an explicitly signed 64-bit type to do the final comparison. (make_aligning_type): Build real negation and use sizetype throughout the offset computation. (maybe_pad_type): Do not issue the warning when the new size expression is too complex. (annotate_value) : Simplify code handling negative values. * gcc-interface/misc.c (gnat_init): Initialize sbitsize_one_node and sbitsize_unit_node. * gcc-interface/trans.c (Attribute_to_gnu) : Fold double negation. (gnat_to_gnu) : Likewise. * gcc-interface/utils.c (convert): Use sbitsize_unit_node. * gcc-interface/utils2.c (compare_arrays): Compute real lengths and use constants in sizetype. Remove dead code and tweak comments. Generate equality instead of inequality comparisons for zero length tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158461 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 1b31890f32c..52fe65a560d 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -407,6 +407,8 @@ gnat_init (void) SET_TYPE_RM_SIZE (boolean_type_node, bitsize_int (1)); build_common_tree_nodes_2 (0); + sbitsize_one_node = sbitsize_int (1); + sbitsize_unit_node = sbitsize_int (BITS_PER_UNIT); boolean_true_node = TYPE_MAX_VALUE (boolean_type_node); ptr_void_type_node = build_pointer_type (void_type_node); -- cgit v1.2.1 From 526c98579389dee0c99901aea0c1030761f83797 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sat, 17 Apr 2010 08:24:16 +0000 Subject: * back-end.adb (Call_Back_End): Pass Standard_Character to gigi. * gcc-interface/gigi.h (gigi): Add standard_character parameter. (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete. * gcc-interface/decl.c (gnat_to_gnu_entity) : Call rm_size. * gcc-interface/misc.c (gnat_init): Set signedness of char as per flag_signed_char. Tag sizetype with "size_type" moniker. * gcc-interface/trans.c (gigi): Add standard_character parameter. Remove useless built-in types. Equate unsigned_char_type_node to Standard.Character. Use it instead of char_type_node throughout. (Attribute_to_gnu): Likewise. (gnat_to_gnu): Likewise. * gcc-interface/utils2.c (build_call_raise): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158462 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 52fe65a560d..f3e7b1b7482 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -389,8 +389,9 @@ static bool gnat_init (void) { /* Do little here, most of the standard declarations are set up after the - front-end has been run. */ - build_common_tree_nodes (true, true); + front-end has been run. Use the same `char' as C, this doesn't really + matter since we'll use the explicit `unsigned char' for Character. */ + build_common_tree_nodes (flag_signed_char, true); /* In Ada, we use a signed type for SIZETYPE. Use the signed type corresponding to the width of Pmode. In most cases when ptr_mode @@ -398,6 +399,7 @@ gnat_init (void) But we get far better code using the width of Pmode. */ size_type_node = gnat_type_for_mode (Pmode, 0); set_sizetype (size_type_node); + TYPE_NAME (sizetype) = get_identifier ("size_type"); /* In Ada, we use an unsigned 8-bit type for the default boolean type. */ boolean_type_node = make_unsigned_type (8); -- cgit v1.2.1 From 3e70070e2728b17a16ceef391b6c74911db31065 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sat, 17 Apr 2010 14:16:36 +0000 Subject: * uintp.h (UI_Lt): Declare. * gcc-interface/decl.c (gnat_to_gnu_entity) : Do the size computation in sizetype. : Use unified handling for all index types. Do not generate MAX_EXPR-based expressions, only COND_EXPR-based ones. Add bypass for PATs. (annotate_value): Change test for negative values. (validate_size): Apply test for negative values on GNAT nodes. (set_rm_size): Likewise. * gcc-interface/misc.c (gnat_init): Set unsigned types for sizetypes. * gcc-interface/utils.c (rest_of_record_type_compilation): Change test for negative values. (max_size) : Do not reassociate a COND_EXPR on the LHS. (builtin_type_for_size): Adjust definition of signed_size_type_node. * gcc-interface/utils2.c (compare_arrays): Optimize comparison of lengths against zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158466 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index f3e7b1b7482..6923105afa2 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -391,13 +391,16 @@ gnat_init (void) /* Do little here, most of the standard declarations are set up after the front-end has been run. Use the same `char' as C, this doesn't really matter since we'll use the explicit `unsigned char' for Character. */ - build_common_tree_nodes (flag_signed_char, true); - - /* In Ada, we use a signed type for SIZETYPE. Use the signed type - corresponding to the width of Pmode. In most cases when ptr_mode - and Pmode differ, C will use the width of ptr_mode for SIZETYPE. - But we get far better code using the width of Pmode. */ - size_type_node = gnat_type_for_mode (Pmode, 0); + build_common_tree_nodes (flag_signed_char, false); + + /* In Ada, we use the unsigned type corresponding to the width of Pmode as + SIZETYPE. In most cases when ptr_mode and Pmode differ, C will use the + width of ptr_mode for SIZETYPE, but we get better code using the width + of Pmode. Note that, although we manipulate negative offsets for some + internal constructs and rely on compile time overflow detection in size + computations, using unsigned types for SIZETYPEs is fine since they are + treated specially by the middle-end, in particular sign-extended. */ + size_type_node = gnat_type_for_mode (Pmode, 1); set_sizetype (size_type_node); TYPE_NAME (sizetype) = get_identifier ("size_type"); -- cgit v1.2.1 From 4dc8a9843444fd298109bdb0df821f43b709ac31 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sat, 17 Apr 2010 14:44:47 +0000 Subject: Fix copyright date. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158468 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 6923105afa2..b54598c4f97 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2009, Free Software Foundation, Inc. * + * Copyright (C) 1992-2010, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * -- cgit v1.2.1 From ad086ed471d513856fff3cf8325b8d5e0ee571a4 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sun, 18 Apr 2010 21:49:29 +0000 Subject: =?UTF-8?q?2010-04-18=20=C2=A0Eric=20Botcazou=20=C2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fold-const.c (fold_comparison): Use ssizetype. * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Use sizetype. * tree-loop-distribution.c (build_size_arg_loc): Likewise. * tree-object-size.c (compute_object_sizes): Use size_type_node. * tree.h (initialize_sizetypes): Remove parameter. (build_common_tree_nodes): Remove second parameter. * stor-layout.c (initialize_sizetypes): Remove parameter. Always create an unsigned type. (set_sizetype): Assert that the passed type is unsigned and simplify. * tree.c (build_common_tree_nodes): Remove second parameter. Adjust call to initialize_sizetypes. * c-decl.c (c_init_decl_processing): Remove second argument in call to build_common_tree_nodes. cp/ * decl.c (cxx_init_decl_processing): Remove second argument in call to build_common_tree_nodes. java/ * decl.c (java_init_decl_processing): Remove argument in call to initialize_sizetypes fortran/ * f95-lang.c (gfc_init_decl_processing): Remove second argument in call to build_common_tree_nodes. ada/ * gcc-interface/misc.c (gnat_init): Remove second argument in call to build_common_tree_nodes. lto/ * lto-lang.c (lto_init): Remove second argument in call to build_common_tree_nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158496 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index b54598c4f97..41c61853c70 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -391,7 +391,7 @@ gnat_init (void) /* Do little here, most of the standard declarations are set up after the front-end has been run. Use the same `char' as C, this doesn't really matter since we'll use the explicit `unsigned char' for Character. */ - build_common_tree_nodes (flag_signed_char, false); + build_common_tree_nodes (flag_signed_char); /* In Ada, we use the unsigned type corresponding to the width of Pmode as SIZETYPE. In most cases when ptr_mode and Pmode differ, C will use the -- cgit v1.2.1 From 1f3db819ff589fec50544ce334ae0200afade36f Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 6 May 2010 10:12:36 +0000 Subject: =?UTF-8?q?2010-05-06=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR 40989 * doc/invoke.texi (Wimplicit): Document as C only. * opts.c (common_handle_option): Add argument kind. (handle_option): Rename as read_cmdline_option. Factor out code to... (handle_option): ... here. New. (handle_options): Rename as read_cmdline_options. (decode_options): Update call. (set_option): Use option index instead of option pointer. Classify diagnostics correctly. (enable_warning_as_error): Call handle_option. * opts.h (set_option): Update declaration. (handle_option): Declare. * langhooks.h (struct lang_hooks): Add argument kind to handle_option. * c.opt (Wimplicit,Wimplicit-int): Initialize to -1. * c-opts.c (set_Wimplicit): Delete. (c_family_lang_mask): New static constant. (c_common_handle_option): Add argument kind. Use handle_option instead of set_Wimplicit. (c_common_post_options): warn_implicit and warn_implicit_int are disabled by default. * c-common.c (warn_implicit): Do not define here. * c-common.h (warn_implicit): Do not declare here. (c_common_handle_option): Update declaration. * lto-opts.c (lto_reissue_options): Update call to set_option. java/ * lang.c (java_handle_option): Add argument kind. fortran/ * options.c (gfc_handle_option): Add argument kind. * gfortran.h (gfc_handle_option): Update declaration. ada/ * gcc-interface/misc.c (gnat_handle_option): Add argument kind. testsuite/ * gcc.dg/pr40989.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159102 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 41c61853c70..db5badcf145 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -66,7 +66,7 @@ static bool gnat_init (void); static unsigned int gnat_init_options (unsigned int, const char **); -static int gnat_handle_option (size_t, const char *, int); +static int gnat_handle_option (size_t, const char *, int, int); static bool gnat_post_options (const char **); static alias_set_type gnat_get_alias_set (tree); static void gnat_print_decl (FILE *, tree, int); @@ -184,7 +184,7 @@ gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED) that have been successfully decoded or 0 on failure. */ static int -gnat_handle_option (size_t scode, const char *arg, int value) +gnat_handle_option (size_t scode, const char *arg, int value, int kind ATTRIBUTE_UNUSED) { const struct cl_option *option = &cl_options[scode]; enum opt_code code = (enum opt_code) scode; -- cgit v1.2.1 From 82099a6cf9df9291df2fcefb59f5ce11095fd857 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 7 May 2010 10:25:54 +0000 Subject: PR 40989 * gcc-interface/misc.c (gnat_handle_option): Fix long line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159149 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index db5badcf145..c8193f37b8a 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -184,7 +184,8 @@ gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED) that have been successfully decoded or 0 on failure. */ static int -gnat_handle_option (size_t scode, const char *arg, int value, int kind ATTRIBUTE_UNUSED) +gnat_handle_option (size_t scode, const char *arg, int value, + int kind ATTRIBUTE_UNUSED) { const struct cl_option *option = &cl_options[scode]; enum opt_code code = (enum opt_code) scode; -- cgit v1.2.1 From 6bda7b348821bfd40d1be3d14ca3452a5163ceaa Mon Sep 17 00:00:00 2001 From: manu Date: Sun, 16 May 2010 10:30:39 +0000 Subject: =?UTF-8?q?2010-05-16=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ada/ * gcc-interface/misc.c (gnat_handle_option): Remove special logic for Wuninitialized without -O. fortran/ * options.c (set_Wall): Remove special logic for Wuninitialized without -O. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159454 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index c8193f37b8a..0f85393d956 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -209,12 +209,7 @@ gnat_handle_option (size_t scode, const char *arg, int value, case OPT_Wall: warn_unused = value; - - /* We save the value of warn_uninitialized, since if they put - -Wuninitialized on the command line, we need to generate a - warning about not using it without also specifying -O. */ - if (warn_uninitialized != 1) - warn_uninitialized = (value ? 2 : 0); + warn_uninitialized = value; break; /* These are used in the GCC Makefile. */ -- cgit v1.2.1 From f96dd70606f789a7982ed4fc70291444a1abc9c7 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Wed, 19 May 2010 17:53:58 +0000 Subject: * langhooks.h (struct lang_hooks): Add new field deep_unsharing. * langhooks-def.h (LANG_HOOKS_DEEP_UNSHARING): New macro. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_DEEP_UNSHARING. * gimplify.c: (mostly_copy_tree_r): Copy trees under SAVE_EXPR and TARGET_EXPR nodes, but only once, if instructed to do so. Do not propagate the 'data' argument to copy_tree_r. (copy_if_shared_r): Remove bogus ATTRIBUTE_UNUSED marker. Propagate 'data' argument to walk_tree. (copy_if_shared): New function. (unmark_visited_r): Remove bogus ATTRIBUTE_UNUSED marker. (unmark_visited): New function. (unshare_body): Call copy_if_shared instead of doing it manually. (unvisit_body): Call unmark_visited instead of doing it manually. ada/ * gcc-interface/misc.c (LANG_HOOKS_DEEP_UNSHARING): Redefine. * gcc-interface/trans.c (unshare_save_expr): Delete. (gigi): Do not unshare trees under SAVE_EXPRs here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159592 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 0f85393d956..dba6dca887c 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -132,6 +132,8 @@ static tree gnat_eh_personality (void); #define LANG_HOOKS_BUILTIN_FUNCTION gnat_builtin_function #undef LANG_HOOKS_EH_PERSONALITY #define LANG_HOOKS_EH_PERSONALITY gnat_eh_personality +#undef LANG_HOOKS_DEEP_UNSHARING +#define LANG_HOOKS_DEEP_UNSHARING true struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; -- cgit v1.2.1 From 1f63d33764ca742bf167b8f4f42ca6e19e355a3b Mon Sep 17 00:00:00 2001 From: jsm28 Date: Tue, 25 May 2010 13:01:45 +0000 Subject: * diagnostic.c: Don't include plugin.h. (diagnostic_report_diagnostic): Don't handle plugins specially here. Pass context to internal_error callback. * diagnostic.h (struct diagnostic_context): Add context parameter to internal_error callback. * plugin.c (warn_if_plugins, plugins_internal_error_function): New. * plugin.h (struct diagnostic_context): Declare. (warn_if_plugins, plugins_internal_error_function): Declare. * toplev.c (general_init): Set global_dc->internal_error. * Makefile.in (diagnostic.o): Update dependencies. ada: * gcc-interface/misc.c (internal_error_function): Add context parameter. Use it to access show_column flag and instead of using global_dc. Call warn_if_plugins. * gcc-interface/Make-lang.in (ada/misc.o): Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159819 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index dba6dca887c..22826ed0b96 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -48,6 +48,7 @@ #include "opts.h" #include "options.h" #include "tree-inline.h" +#include "plugin.h" #include "ada.h" #include "adadecode.h" @@ -75,7 +76,8 @@ static const char *gnat_printable_name (tree, int); static const char *gnat_dwarf_name (tree, int); static tree gnat_return_tree (tree); static void gnat_parse_file (int); -static void internal_error_function (const char *, va_list *); +static void internal_error_function (diagnostic_context *, + const char *, va_list *); static tree gnat_type_max_size (const_tree); static void gnat_get_subrange_bounds (const_tree, tree *, tree *); static tree gnat_eh_personality (void); @@ -334,7 +336,8 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) /* Here is the function to handle the compiler error processing in GCC. */ static void -internal_error_function (const char *msgid, va_list *ap) +internal_error_function (diagnostic_context *context, + const char *msgid, va_list *ap) { text_info tinfo; char *buffer, *p, *loc; @@ -342,17 +345,20 @@ internal_error_function (const char *msgid, va_list *ap) Fat_Pointer fp, fp_loc; expanded_location s; + /* Warn if plugins present. */ + warn_if_plugins (); + /* Reset the pretty-printer. */ - pp_clear_output_area (global_dc->printer); + pp_clear_output_area (context->printer); /* Format the message into the pretty-printer. */ tinfo.format_spec = msgid; tinfo.args_ptr = ap; tinfo.err_no = errno; - pp_format_verbatim (global_dc->printer, &tinfo); + pp_format_verbatim (context->printer, &tinfo); /* Extract a (writable) pointer to the formatted text. */ - buffer = xstrdup (pp_formatted_text (global_dc->printer)); + buffer = xstrdup (pp_formatted_text (context->printer)); /* Go up to the first newline. */ for (p = buffer; *p; p++) @@ -368,7 +374,7 @@ internal_error_function (const char *msgid, va_list *ap) fp.Array = buffer; s = expand_location (input_location); - if (flag_show_column && s.column != 0) + if (context->show_column && s.column != 0) asprintf (&loc, "%s:%d:%d", s.file, s.line, s.column); else asprintf (&loc, "%s:%d", s.file, s.line); -- cgit v1.2.1 From f70a50e703363936934dea49045d00f6501a590b Mon Sep 17 00:00:00 2001 From: steven Date: Tue, 25 May 2010 21:07:40 +0000 Subject: * gcc-interface/utils.c: Do not include function.h, pointer-set.h, and gimple.h. Explain why rtl.h has to be included. (handle_vector_size_attribute): Call reconstruct_complex_type directly. * gcc-interface/targtyps.c: Do not include tm_p.h * gcc-interface/utils2.c: Do not include flags.h. * gcc-interface/trans.c: Do not include expr.h. Include rtl.h instead, and explain why it has to be included. * gcc-interface/misc.c: Do not include expr.h, libfuncs.h, cgraph.h, and optabs.h. Include function.h and explain why. Explain why except.h is included. (enumerate_modes): Remove unused function. * gcc-interface/gigi.h (enumerate_modes): Remove prototype. * gcc-interface/Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159844 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 87 +------------------------------------------- 1 file changed, 2 insertions(+), 85 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 22826ed0b96..c824fefc734 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -34,21 +34,17 @@ #include "tree.h" #include "diagnostic.h" #include "target.h" -#include "expr.h" -#include "libfuncs.h" #include "ggc.h" #include "flags.h" #include "debug.h" -#include "cgraph.h" -#include "optabs.h" #include "toplev.h" -#include "except.h" #include "langhooks.h" #include "langhooks-def.h" #include "opts.h" #include "options.h" -#include "tree-inline.h" #include "plugin.h" +#include "function.h" /* For pass_by_reference. */ +#include "except.h" /* For USING_SJLJ_EXCEPTIONS. */ #include "ada.h" #include "adadecode.h" @@ -719,85 +715,6 @@ must_pass_by_ref (tree gnu_type) && TREE_CODE (TYPE_SIZE (gnu_type)) != INTEGER_CST)); } -/* This function is called by the front end to enumerate all the supported - modes for the machine. We pass a function which is called back with - the following integer parameters: - - FLOAT_P nonzero if this represents a floating-point mode - COMPLEX_P nonzero is this represents a complex mode - COUNT count of number of items, nonzero for vector mode - PRECISION number of bits in data representation - MANTISSA number of bits in mantissa, if FP and known, else zero. - SIZE number of bits used to store data - ALIGN number of bits to which mode is aligned. */ - -void -enumerate_modes (void (*f) (int, int, int, int, int, int, unsigned int)) -{ - int iloop; - - for (iloop = 0; iloop < NUM_MACHINE_MODES; iloop++) - { - enum machine_mode i = (enum machine_mode) iloop; - enum machine_mode j; - bool float_p = 0; - bool complex_p = 0; - bool vector_p = 0; - bool skip_p = 0; - int mantissa = 0; - enum machine_mode inner_mode = i; - - switch (GET_MODE_CLASS (i)) - { - case MODE_INT: - break; - case MODE_FLOAT: - float_p = 1; - break; - case MODE_COMPLEX_INT: - complex_p = 1; - inner_mode = GET_MODE_INNER (i); - break; - case MODE_COMPLEX_FLOAT: - float_p = 1; - complex_p = 1; - inner_mode = GET_MODE_INNER (i); - break; - case MODE_VECTOR_INT: - vector_p = 1; - inner_mode = GET_MODE_INNER (i); - break; - case MODE_VECTOR_FLOAT: - float_p = 1; - vector_p = 1; - inner_mode = GET_MODE_INNER (i); - break; - default: - skip_p = 1; - } - - /* Skip this mode if it's one the front end doesn't need to know about - (e.g., the CC modes) or if there is no add insn for that mode (or - any wider mode), meaning it is not supported by the hardware. If - this a complex or vector mode, we care about the inner mode. */ - for (j = inner_mode; j != VOIDmode; j = GET_MODE_WIDER_MODE (j)) - if (optab_handler (add_optab, j)->insn_code != CODE_FOR_nothing) - break; - - if (float_p) - { - const struct real_format *fmt = REAL_MODE_FORMAT (inner_mode); - - mantissa = fmt->p; - } - - if (!skip_p && j != VOIDmode) - (*f) (float_p, complex_p, vector_p ? GET_MODE_NUNITS (i) : 0, - GET_MODE_BITSIZE (i), mantissa, - GET_MODE_SIZE (i) * BITS_PER_UNIT, GET_MODE_ALIGNMENT (i)); - } -} - /* Return the size of the FP mode with precision PREC. */ int -- cgit v1.2.1 From 474db1198e42852de5f5a47f4a5dda18cafaa565 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Sun, 30 May 2010 10:38:00 +0000 Subject: * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust warning message. Fix nits in comments. * gcc-interface/misc.c (gnat_init_gcc_eh): Likewise. * gcc-interface/trans.c (gigi): Likewise. (Attribute_to_gnu): Likewise. (Case_Statement_to_gnu): Likewise. (gnat_to_gnu): Adjust warning message. * gcc-interface/utils.c (create_var_decl_1): Fix nits in comments. (build_vms_descriptor32): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160048 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index c824fefc734..a80afbdc80e 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -460,10 +460,10 @@ gnat_init_gcc_eh (void) right exception regions. */ using_eh_for_cleanups (); - /* Turn on -fexceptions and -fnon-call-exceptions. The first one triggers - the generation of the necessary exception runtime tables. The second one - is useful for two reasons: 1/ we map some asynchronous signals like SEGV - to exceptions, so we need to ensure that the insns which can lead to such + /* Turn on -fexceptions and -fnon-call-exceptions. The first one triggers + the generation of the necessary exception tables. The second one is + useful for two reasons: 1/ we map some asynchronous signals like SEGV to + exceptions, so we need to ensure that the insns which can lead to such signals are correctly attached to the exception region they pertain to, 2/ Some calls to pure subprograms are handled as libcall blocks and then marked as "cannot trap" if the flag is not set (see emit_libcall_block). -- cgit v1.2.1 From ba72912a012b97cad825eebee3f5f22253d0afe4 Mon Sep 17 00:00:00 2001 From: lauras Date: Tue, 8 Jun 2010 07:25:24 +0000 Subject: gcc/ada: 2010-06-08 Laurynas Biveinis * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160425 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index a80afbdc80e..229663b7ce2 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -574,7 +574,7 @@ static const char * gnat_printable_name (tree decl, int verbosity) { const char *coded_name = IDENTIFIER_POINTER (DECL_NAME (decl)); - char *ada_name = (char *) ggc_alloc (strlen (coded_name) * 2 + 60); + char *ada_name = (char *) ggc_alloc_atomic (strlen (coded_name) * 2 + 60); __gnat_decode (coded_name, ada_name, 0); -- cgit v1.2.1 From 5e34232249da0188d01746d392d971080dce1d58 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 18 Jun 2010 15:59:27 +0000 Subject: 2010-06-18 Javier Miranda * exp_cg.adb (Homonym_Suffix_Length): Minor code reorganization. 2010-06-18 Thomas Quinot * sprint.ads: Minor reformatting. * output.ads: Update obsolete comment. 2010-06-18 Ed Schonberg * freeze.adb (Build_And_Analyze_Renamed_Body): if the renamed entity is an external intrinsic operation (e.g. a GCC numeric function) indicate that the renaming entity has the same characteristics, so a call to it is properly expanded. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161003 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 229663b7ce2..3716f1a631f 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -135,6 +135,9 @@ static tree gnat_eh_personality (void); struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; +/* This symbol needs to be defined for the front-end. */ +void *callgraph_info_file = NULL; + /* How much we want of our DWARF extensions. Some of our dwarf+ extensions are incompatible with regular GDB versions, so we must make sure to only produce them on explicit request. This is eventually reflected into the -- cgit v1.2.1 From 596981c8fa329037fcb1297eaa219a36ad323e3e Mon Sep 17 00:00:00 2001 From: steven Date: Mon, 28 Jun 2010 10:52:46 +0000 Subject: gcc/ChangeLog: 2010-06-28 Steven Bosscher * system.h: Poison GCC_EXCEPT_H for front-end files. * langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions langhook. * langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New. Define to NULL by default. * except.h: Define GCC_EXCEPT_H. (doing_eh): Remove prototype. (init_eh, init_eh_for_function): Move prototypes to toplev.h. (lang_protect_cleanup_actions): Remove. * except.c (lang_protect_cleanup_actions): Remove. (doing_eh): Remove. (gen_eh_region): Don't check doing_eh here. * toplev.h (init_eh, init_eh_for_function_): Moved from except.h. * tree-eh.c (honor_protect_cleanup_actions): Use new langhook instead of lang_protect_cleanup_actions. * omp-low.c (maybe_catch_exception): Likewise. * Makefile.in: Update dependencies. gcc/c-family/ChangeLog: 2010-06-28 Steven Bosscher * c-cppbuiltin.c: Do not include except.h. gcc/objc/ChangeLog: 2010-06-28 Steven Bosscher * objc-act.c: Do not include except.h. gcc/cp/ChangeLog: 2010-06-28 Steven Bosscher * init.c: Do not include except.h. * decl.c: Likewise. * expr.c: Likewise. * cp-lang.c: Likewise. * pt.c: Likewise. * semantics.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. (init_exception_processing): Do not set the removed lang_protect_cleanup_actions here. (cp_protect_cleanup_actions): Make non-static and remove prototype. (doing_eh): New, moved from except.c but removed the do_warning flag. (expand_start_catch_block): Update doing_eh call. (expand_end_catch_block): Likewise. (build_throw): Likewise. * cp-tree.h: Prototype cp_protect_cleanup_actions. * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to cp_protect_cleanup_actions. * Make-lang.in: Update dependencies. gcc/objcp/ChangeLog: 2010-06-28 Steven Bosscher * objcp-lang.c: Do not include except.h. * Make-lang.in: Update dependencies. gcc/java/ChangeLog: 2010-06-28 Steven Bosscher * lang.c: Do not include except.h * except.c: Likewise. (doing_eh): New, moved from except.c (in gcc/) but removed the do_warning flag. (maybe_start_try): Update doing_eh call. * Make-lang.in: Update dependencies. gcc/ada/ChangeLog: 2010-06-28 Steven Bosscher * gcc-interface/misc.c: Do not include except.h. * gcc-interface/Make-lang.in: Update dependencies. gcc/fortran/ChangeLog: 2010-06-28 Steven Bosscher * Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161484 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 3716f1a631f..4033173d782 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -25,7 +25,7 @@ /* This file contains parts of the compiler that are required for interfacing with GCC but otherwise do nothing and parts of Gigi that need to know - about RTL. */ + about GIMPLE. */ #include "config.h" #include "system.h" @@ -44,7 +44,6 @@ #include "options.h" #include "plugin.h" #include "function.h" /* For pass_by_reference. */ -#include "except.h" /* For USING_SJLJ_EXCEPTIONS. */ #include "ada.h" #include "adadecode.h" -- cgit v1.2.1 From 6761caec6bf325688f18b52d0b1ad51bc44cdb61 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Fri, 2 Jul 2010 11:52:30 +0000 Subject: * gcc-interface/misc.c (gnat_handle_option): Do not populate gnat_argv. (gnat_handle_option): Allocate only one element for gnat_argv. (gnat_init): Do not populate gnat_argv. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161704 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/gcc-interface/misc.c | 56 +++++++------------------------------------- 1 file changed, 9 insertions(+), 47 deletions(-) (limited to 'gcc/ada/gcc-interface/misc.c') diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 4033173d782..8444e4f714c 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -191,7 +191,6 @@ gnat_handle_option (size_t scode, const char *arg, int value, { const struct cl_option *option = &cl_options[scode]; enum opt_code code = (enum opt_code) scode; - char *q; if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE))) { @@ -201,20 +200,11 @@ gnat_handle_option (size_t scode, const char *arg, int value, switch (code) { - case OPT_I: - q = XNEWVEC (char, sizeof("-I") + strlen (arg)); - strcpy (q, "-I"); - strcat (q, arg); - gnat_argv[gnat_argc] = q; - gnat_argc++; - break; - case OPT_Wall: warn_unused = value; warn_uninitialized = value; break; - /* These are used in the GCC Makefile. */ case OPT_Wmissing_prototypes: case OPT_Wstrict_prototypes: case OPT_Wwrite_strings: @@ -223,15 +213,7 @@ gnat_handle_option (size_t scode, const char *arg, int value, case OPT_Wold_style_definition: case OPT_Wmissing_format_attribute: case OPT_Woverlength_strings: - break; - - /* This is handled by the front-end. */ - case OPT_nostdinc: - break; - - case OPT_nostdlib: - gnat_argv[gnat_argc] = xstrdup ("-nostdlib"); - gnat_argc++; + /* These are used in the GCC Makefile. */ break; case OPT_feliminate_unused_debug_types: @@ -242,9 +224,8 @@ gnat_handle_option (size_t scode, const char *arg, int value, flag_eliminate_unused_debug_types = -value; break; - case OPT_fRTS_: - gnat_argv[gnat_argc] = xstrdup ("-fRTS"); - gnat_argc++; + case OPT_gdwarfplus: + gnat_dwarf_extensions = 1; break; case OPT_gant: @@ -253,22 +234,12 @@ gnat_handle_option (size_t scode, const char *arg, int value, /* ... fall through ... */ case OPT_gnat: - /* Recopy the switches without the 'gnat' prefix. */ - gnat_argv[gnat_argc] = XNEWVEC (char, strlen (arg) + 2); - gnat_argv[gnat_argc][0] = '-'; - strcpy (gnat_argv[gnat_argc] + 1, arg); - gnat_argc++; - break; - case OPT_gnatO: - gnat_argv[gnat_argc] = xstrdup ("-O"); - gnat_argc++; - gnat_argv[gnat_argc] = xstrdup (arg); - gnat_argc++; - break; - - case OPT_gdwarfplus: - gnat_dwarf_extensions = 1; + case OPT_fRTS_: + case OPT_I: + case OPT_nostdinc: + case OPT_nostdlib: + /* These are handled by the front-end. */ break; default: @@ -283,8 +254,7 @@ gnat_handle_option (size_t scode, const char *arg, int value, static unsigned int gnat_init_options (unsigned int argc, const char **argv) { - /* Initialize gnat_argv with save_argv size. */ - gnat_argv = (char **) xmalloc ((argc + 1) * sizeof (argv[0])); + gnat_argv = (char **) xmalloc (sizeof (argv[0])); gnat_argv[0] = xstrdup (argv[0]); /* name of the command */ gnat_argc = 1; @@ -423,14 +393,6 @@ gnat_init (void) /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ internal_reference_types (); - /* Add the input filename as the last argument. */ - if (main_input_filename) - { - gnat_argv[gnat_argc] = xstrdup (main_input_filename); - gnat_argc++; - gnat_argv[gnat_argc] = NULL; - } - /* Register our internal error function. */ global_dc->internal_error = &internal_error_function; -- cgit v1.2.1