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/fortran/f95-lang.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 97a071d06f9..f9d1878d379 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -241,9 +241,6 @@ gfc_be_parse_file (int set_yydebug ATTRIBUTE_UNUSED) gfc_parse_file (); gfc_generate_constructors (); - cgraph_finalize_compilation_unit (); - cgraph_optimize (); - /* Tell the frontend about any errors. */ gfc_get_errors (&warnings, &errors); errorcount += errors; -- 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/fortran/f95-lang.c | 80 -------------------------------------------------- 1 file changed, 80 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index f9d1878d379..181f0fcf755 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -94,7 +94,6 @@ static void gfc_init_builtin_functions (void); static bool gfc_init (void); static void gfc_finish (void); static void gfc_print_identifier (FILE *, tree, int); -static bool gfc_mark_addressable (tree); void do_function_end (void); int global_bindings_p (void); static void clear_binding_stack (void); @@ -137,7 +136,6 @@ static void gfc_init_ts (void); #define LANG_HOOKS_POST_OPTIONS gfc_post_options #define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier #define LANG_HOOKS_PARSE_FILE gfc_be_parse_file -#define LANG_HOOKS_MARK_ADDRESSABLE gfc_mark_addressable #define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode #define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size #define LANG_HOOKS_GET_ALIAS_SET gfc_get_alias_set @@ -563,84 +561,6 @@ gfc_init_decl_processing (void) } -/* Mark EXP saying that we need to be able to take the - address of it; it should not be allocated in a register. - In Fortran 95 this is only the case for variables with - the TARGET attribute, but we implement it here for a - likely future Cray pointer extension. - Value is 1 if successful. */ -/* TODO: Check/fix mark_addressable. */ - -bool -gfc_mark_addressable (tree exp) -{ - register tree x = exp; - while (1) - switch (TREE_CODE (x)) - { - case COMPONENT_REF: - case ADDR_EXPR: - case ARRAY_REF: - case REALPART_EXPR: - case IMAGPART_EXPR: - x = TREE_OPERAND (x, 0); - break; - - case CONSTRUCTOR: - TREE_ADDRESSABLE (x) = 1; - return true; - - case VAR_DECL: - case CONST_DECL: - case PARM_DECL: - case RESULT_DECL: - if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x) && DECL_NONLOCAL (x)) - { - if (TREE_PUBLIC (x)) - { - error ("global register variable %qs used in nested function", - IDENTIFIER_POINTER (DECL_NAME (x))); - return false; - } - pedwarn (input_location, 0, "register variable %qs used in nested function", - IDENTIFIER_POINTER (DECL_NAME (x))); - } - else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)) - { - if (TREE_PUBLIC (x)) - { - error ("address of global register variable %qs requested", - IDENTIFIER_POINTER (DECL_NAME (x))); - return true; - } - -#if 0 - /* If we are making this addressable due to its having - volatile components, give a different error message. Also - handle the case of an unnamed parameter by not trying - to give the name. */ - - else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x))) - { - error ("cannot put object with volatile field into register"); - return false; - } -#endif - - pedwarn (input_location, 0, "address of register variable %qs requested", - IDENTIFIER_POINTER (DECL_NAME (x))); - } - - /* drops in */ - case FUNCTION_DECL: - TREE_ADDRESSABLE (x) = 1; - - default: - return true; - } -} - - /* Return the typed-based alias set for T, which may be an expression or a type. Return -1 if we don't do anything special. */ -- 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/fortran/f95-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 181f0fcf755..e061538878f 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -154,7 +154,7 @@ static void gfc_init_ts (void); #define LANG_HOOKS_BUILTIN_FUNCTION gfc_builtin_function #define LANG_HOOKS_GET_ARRAY_DESCR_INFO gfc_get_array_descr_info -const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; +struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; #define NULL_BINDING_LEVEL (struct binding_level *) NULL -- 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/fortran/f95-lang.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index e061538878f..3d94fd62424 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -1155,10 +1155,6 @@ gfc_maybe_initialize_eh (void) return; gfc_eh_initialized_p = true; - eh_personality_libfunc - = init_one_libfunc (USING_SJLJ_EXCEPTIONS - ? "__gcc_personality_sj0" - : "__gcc_personality_v0"); default_init_unwind_resume_libfunc (); using_eh_for_cleanups (); } -- 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/fortran/f95-lang.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 3d94fd62424..a21044c64ae 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -1131,7 +1131,7 @@ gfc_init_builtin_functions (void) BUILT_IN_EMUTLS_REGISTER_COMMON, "__emutls_register_common", false); - build_common_builtin_nodes (); + build_common_builtin_nodes (false); targetm.init_builtins (); } @@ -1155,7 +1155,6 @@ gfc_maybe_initialize_eh (void) return; gfc_eh_initialized_p = true; - default_init_unwind_resume_libfunc (); using_eh_for_cleanups (); } -- cgit v1.2.1 From 471eff3649c0d9383213b2dfef646d0496d43e28 Mon Sep 17 00:00:00 2001 From: rth Date: Mon, 28 Sep 2009 16:44:32 +0000 Subject: * except.h (struct eh_region_d): Add use_cxa_end_cleanup. * except.c (gen_eh_region): Set it. (duplicate_eh_regions_1): Copy it. * tree-eh.c (lower_resx): Use it to determine which function to call to resume. * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup. * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. * builtins.def (BUILT_IN_CXA_END_CLEANUP): New. * tree.c (build_common_builtin_nodes): Remove parameter. Build BUILT_IN_CXA_END_CLEANUP if necessary. * tree.h (build_common_builtin_nodes): Update decl. * c-common.c (c_define_builtins): Update call to build_common_builtin_nodes. gcc/ada/ * gcc-interface/utils.c (gnat_install_builtins): Update call to build_common_builtin_nodes. gcc/cp/ * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Update call to build_common_builtin_nodes. gcc/java/ * builtins.c (initialize_builtins): Update call to build_common_builtin_nodes. * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152241 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index a21044c64ae..5d2846c8890 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -1131,7 +1131,7 @@ gfc_init_builtin_functions (void) BUILT_IN_EMUTLS_REGISTER_COMMON, "__emutls_register_common", false); - build_common_builtin_nodes (false); + build_common_builtin_nodes (); targetm.init_builtins (); } -- 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/fortran/f95-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 5d2846c8890..96ff8bb2ef3 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -542,7 +542,7 @@ gfc_init_decl_processing (void) /* Build common tree nodes. char_type_node is unsigned because we only use it for actual characters, not for INTEGER(1). Also, we want double_type_node to actually have double precision. */ - build_common_tree_nodes (false, false); + build_common_tree_nodes (false); /* x86_64 mingw32 has a sizetype of "unsigned long long", most other hosts have a sizetype of "unsigned long". Therefore choose the correct size in mostly target independent way. */ -- cgit v1.2.1 From 2cdf5987c235a29f5c63177ab5f9a2b5f96c2f03 Mon Sep 17 00:00:00 2001 From: jakub Date: Wed, 21 Apr 2010 21:20:07 +0000 Subject: PR fortran/43836 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on the decl. * gfortran.dg/gomp/pr43836.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158619 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 96ff8bb2ef3..8efa6de679b 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -1,5 +1,5 @@ /* gfortran backend interface - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. Contributed by Paul Brook. @@ -608,6 +608,7 @@ gfc_define_builtin (const char *name, library_name, NULL_TREE); if (const_p) TREE_READONLY (decl) = 1; + TREE_NOTHROW (decl) = 1; built_in_decls[code] = decl; implicit_built_in_decls[code] = decl; -- cgit v1.2.1 From e1036019ffb87690c22208ec7bab1f17c23e9c65 Mon Sep 17 00:00:00 2001 From: froydnj Date: Mon, 17 May 2010 16:09:35 +0000 Subject: gcc/ * tree.c (build_function_type_list_1): Remove bogus assert condition. gcc/fortran/ * trans-types.c (gfc_init_types): Use build_function_type_list. (gfc_get_ppc_type): Likewise. * trans-decl.c (gfc_generate_constructors): Likewise. * f95-lang.c (build_builtin_fntypes): Likewise. (gfc_init_builtin_functions): Likewise. (DEF_FUNCTION_TYPE_0): Likewise. (DEF_FUNCTION_TYPE_1): Likewise. (DEF_FUNCTION_TYPE_2): Likewise. (DEF_FUNCTION_TYPE_3): Likewise. (DEF_FUNCTION_TYPE_4): Likewise. (DEF_FUNCTION_TYPE_5): Likewise. (DEF_FUNCTION_TYPE_6): Likewise. (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7. (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159491 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 304 ++++++++++++++++++++----------------------------- 1 file changed, 123 insertions(+), 181 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 8efa6de679b..f7e0b4ff649 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -636,28 +636,23 @@ gfc_define_builtin (const char *name, static void build_builtin_fntypes (tree *fntype, tree type) { - tree tmp; - /* type (*) (type) */ - tmp = tree_cons (NULL_TREE, type, void_list_node); - fntype[0] = build_function_type (type, tmp); + fntype[0] = build_function_type_list (type, type, NULL_TREE); /* type (*) (type, type) */ - tmp = tree_cons (NULL_TREE, type, tmp); - fntype[1] = build_function_type (type, tmp); - /* type (*) (int, type) */ - tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node); - tmp = tree_cons (NULL_TREE, type, tmp); - fntype[2] = build_function_type (type, tmp); - /* type (*) (void) */ - fntype[3] = build_function_type (type, void_list_node); - /* type (*) (type, &int) */ - tmp = tree_cons (NULL_TREE, type, void_list_node); - tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), tmp); - fntype[4] = build_function_type (type, tmp); + fntype[1] = build_function_type_list (type, type, type, NULL_TREE); /* type (*) (type, int) */ - tmp = tree_cons (NULL_TREE, type, void_list_node); - tmp = tree_cons (NULL_TREE, integer_type_node, tmp); - fntype[5] = build_function_type (type, tmp); + fntype[2] = build_function_type_list (type, + type, integer_type_node, NULL_TREE); + /* type (*) (void) */ + fntype[3] = build_function_type_list (type, NULL_TREE); + /* type (*) (&int, type) */ + fntype[4] = build_function_type_list (type, + build_pointer_type (integer_type_node), + type, + NULL_TREE); + /* type (*) (int, type) */ + fntype[5] = build_function_type_list (type, + integer_type_node, type, NULL_TREE); } @@ -721,7 +716,6 @@ gfc_init_builtin_functions (void) tree func_double_doublep_doublep; tree func_longdouble_longdoublep_longdoublep; tree ftype, ptype; - tree tmp, type; tree builtin_types[(int) BT_LAST + 1]; build_builtin_fntypes (mfunc_float, float_type_node); @@ -731,46 +725,39 @@ gfc_init_builtin_functions (void) build_builtin_fntypes (mfunc_cdouble, complex_double_type_node); build_builtin_fntypes (mfunc_clongdouble, complex_long_double_type_node); - tmp = tree_cons (NULL_TREE, complex_float_type_node, void_list_node); - func_cfloat_float = build_function_type (float_type_node, tmp); + func_cfloat_float = build_function_type_list (float_type_node, + complex_float_type_node, + NULL_TREE); - tmp = tree_cons (NULL_TREE, float_type_node, void_list_node); - func_float_cfloat = build_function_type (complex_float_type_node, tmp); + func_float_cfloat = build_function_type_list (complex_float_type_node, + float_type_node, NULL_TREE); - tmp = tree_cons (NULL_TREE, complex_double_type_node, void_list_node); - func_cdouble_double = build_function_type (double_type_node, tmp); + func_cdouble_double = build_function_type_list (double_type_node, + complex_double_type_node, + NULL_TREE); - tmp = tree_cons (NULL_TREE, double_type_node, void_list_node); - func_double_cdouble = build_function_type (complex_double_type_node, tmp); + func_double_cdouble = build_function_type_list (complex_double_type_node, + double_type_node, NULL_TREE); - tmp = tree_cons (NULL_TREE, complex_long_double_type_node, void_list_node); func_clongdouble_longdouble = - build_function_type (long_double_type_node, tmp); + build_function_type_list (long_double_type_node, + complex_long_double_type_node, NULL_TREE); - tmp = tree_cons (NULL_TREE, long_double_type_node, void_list_node); func_longdouble_clongdouble = - build_function_type (complex_long_double_type_node, tmp); + build_function_type_list (complex_long_double_type_node, + long_double_type_node, NULL_TREE); ptype = build_pointer_type (float_type_node); - tmp = tree_cons (NULL_TREE, float_type_node, - tree_cons (NULL_TREE, ptype, - tree_cons (NULL_TREE, ptype, void_list_node))); func_float_floatp_floatp = - build_function_type (void_type_node, tmp); + build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); ptype = build_pointer_type (double_type_node); - tmp = tree_cons (NULL_TREE, double_type_node, - tree_cons (NULL_TREE, ptype, - tree_cons (NULL_TREE, ptype, void_list_node))); func_double_doublep_doublep = - build_function_type (void_type_node, tmp); + build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); ptype = build_pointer_type (long_double_type_node); - tmp = tree_cons (NULL_TREE, long_double_type_node, - tree_cons (NULL_TREE, ptype, - tree_cons (NULL_TREE, ptype, void_list_node))); func_longdouble_longdoublep_longdoublep = - build_function_type (void_type_node, tmp); + build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); #include "mathbuiltins.def" @@ -847,28 +834,31 @@ gfc_init_builtin_functions (void) BUILT_IN_HUGE_VALF, "__builtin_huge_valf", true); /* lround{f,,l} and llround{f,,l} */ - type = tree_cons (NULL_TREE, float_type_node, void_list_node); - tmp = build_function_type (long_integer_type_node, type); - gfc_define_builtin ("__builtin_lroundf", tmp, BUILT_IN_LROUNDF, + ftype = build_function_type_list (long_integer_type_node, + float_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_lroundf", ftype, BUILT_IN_LROUNDF, "lroundf", true); - tmp = build_function_type (long_long_integer_type_node, type); - gfc_define_builtin ("__builtin_llroundf", tmp, BUILT_IN_LLROUNDF, + ftype = build_function_type_list (long_long_integer_type_node, + float_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_llroundf", ftype, BUILT_IN_LLROUNDF, "llroundf", true); - type = tree_cons (NULL_TREE, double_type_node, void_list_node); - tmp = build_function_type (long_integer_type_node, type); - gfc_define_builtin ("__builtin_lround", tmp, BUILT_IN_LROUND, + ftype = build_function_type_list (long_integer_type_node, + double_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_lround", ftype, BUILT_IN_LROUND, "lround", true); - tmp = build_function_type (long_long_integer_type_node, type); - gfc_define_builtin ("__builtin_llround", tmp, BUILT_IN_LLROUND, + ftype = build_function_type_list (long_long_integer_type_node, + double_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_llround", ftype, BUILT_IN_LLROUND, "llround", true); - type = tree_cons (NULL_TREE, long_double_type_node, void_list_node); - tmp = build_function_type (long_integer_type_node, type); - gfc_define_builtin ("__builtin_lroundl", tmp, BUILT_IN_LROUNDL, + ftype = build_function_type_list (long_integer_type_node, + long_double_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_lroundl", ftype, BUILT_IN_LROUNDL, "lroundl", true); - tmp = build_function_type (long_long_integer_type_node, type); - gfc_define_builtin ("__builtin_llroundl", tmp, BUILT_IN_LLROUNDL, + ftype = build_function_type_list (long_long_integer_type_node, + long_double_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_llroundl", ftype, BUILT_IN_LLROUNDL, "llroundl", true); /* These are used to implement the ** operator. */ @@ -920,173 +910,125 @@ gfc_init_builtin_functions (void) } /* For LEADZ / TRAILZ. */ - tmp = tree_cons (NULL_TREE, unsigned_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); + ftype = build_function_type_list (integer_type_node, + unsigned_type_node, NULL_TREE); gfc_define_builtin ("__builtin_clz", ftype, BUILT_IN_CLZ, "__builtin_clz", true); - - tmp = tree_cons (NULL_TREE, long_unsigned_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); - gfc_define_builtin ("__builtin_clzl", ftype, BUILT_IN_CLZL, - "__builtin_clzl", true); - - tmp = tree_cons (NULL_TREE, long_long_unsigned_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); - gfc_define_builtin ("__builtin_clzll", ftype, BUILT_IN_CLZLL, - "__builtin_clzll", true); - - tmp = tree_cons (NULL_TREE, unsigned_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); gfc_define_builtin ("__builtin_ctz", ftype, BUILT_IN_CTZ, "__builtin_ctz", true); - tmp = tree_cons (NULL_TREE, long_unsigned_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); + ftype = build_function_type_list (integer_type_node, + long_unsigned_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_clzl", ftype, BUILT_IN_CLZL, + "__builtin_clzl", true); gfc_define_builtin ("__builtin_ctzl", ftype, BUILT_IN_CTZL, "__builtin_ctzl", true); - tmp = tree_cons (NULL_TREE, long_long_unsigned_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); + ftype = build_function_type_list (integer_type_node, + long_long_unsigned_type_node, NULL_TREE); + gfc_define_builtin ("__builtin_clzll", ftype, BUILT_IN_CLZLL, + "__builtin_clzll", true); gfc_define_builtin ("__builtin_ctzll", ftype, BUILT_IN_CTZLL, "__builtin_ctzll", true); /* Other builtin functions we use. */ - tmp = tree_cons (NULL_TREE, long_integer_type_node, void_list_node); - tmp = tree_cons (NULL_TREE, long_integer_type_node, tmp); - ftype = build_function_type (long_integer_type_node, tmp); + ftype = build_function_type_list (long_integer_type_node, + long_integer_type_node, + long_integer_type_node, NULL_TREE); gfc_define_builtin ("__builtin_expect", ftype, BUILT_IN_EXPECT, "__builtin_expect", true); - tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node); - ftype = build_function_type (void_type_node, tmp); + ftype = build_function_type_list (void_type_node, + pvoid_type_node, NULL_TREE); gfc_define_builtin ("__builtin_free", ftype, BUILT_IN_FREE, "free", false); - tmp = tree_cons (NULL_TREE, size_type_node, void_list_node); - ftype = build_function_type (pvoid_type_node, tmp); + ftype = build_function_type_list (pvoid_type_node, + size_type_node, NULL_TREE); gfc_define_builtin ("__builtin_malloc", ftype, BUILT_IN_MALLOC, "malloc", false); DECL_IS_MALLOC (built_in_decls[BUILT_IN_MALLOC]) = 1; - tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node); - tmp = tree_cons (NULL_TREE, size_type_node, tmp); - ftype = build_function_type (pvoid_type_node, tmp); + ftype = build_function_type_list (pvoid_type_node, + size_type_node, pvoid_type_node, + NULL_TREE); gfc_define_builtin ("__builtin_realloc", ftype, BUILT_IN_REALLOC, "realloc", false); - tmp = tree_cons (NULL_TREE, void_type_node, void_list_node); - ftype = build_function_type (integer_type_node, tmp); + ftype = build_function_type_list (integer_type_node, + void_type_node, NULL_TREE); gfc_define_builtin ("__builtin_isnan", ftype, BUILT_IN_ISNAN, "__builtin_isnan", true); #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \ builtin_types[(int) ENUM] = VALUE; -#define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ - builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], \ - void_list_node); +#define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \ + builtin_types[(int) ENUM] \ + = build_function_type_list (builtin_types[(int) RETURN], \ + NULL_TREE); #define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \ builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - void_list_node)); -#define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - void_list_node))); -#define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ - builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG3], \ - void_list_node)))); + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + NULL_TREE); +#define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \ + builtin_types[(int) ENUM] \ + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + builtin_types[(int) ARG2], \ + NULL_TREE); +#define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \ + builtin_types[(int) ENUM] \ + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + builtin_types[(int) ARG2], \ + builtin_types[(int) ARG3], \ + NULL_TREE); #define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \ builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG4], \ - void_list_node))))); + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + builtin_types[(int) ARG2], \ + builtin_types[(int) ARG3], \ + builtin_types[(int) ARG4], \ + NULL_TREE); #define DEF_FUNCTION_TYPE_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \ builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG4], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG5],\ - void_list_node)))))); + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + builtin_types[(int) ARG2], \ + builtin_types[(int) ARG3], \ + builtin_types[(int) ARG4], \ + builtin_types[(int) ARG5], \ + NULL_TREE); #define DEF_FUNCTION_TYPE_6(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ ARG6) \ builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG4], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG5], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG6],\ - void_list_node))))))); + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + builtin_types[(int) ARG2], \ + builtin_types[(int) ARG3], \ + builtin_types[(int) ARG4], \ + builtin_types[(int) ARG5], \ + builtin_types[(int) ARG6], \ + NULL_TREE); #define DEF_FUNCTION_TYPE_7(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \ ARG6, ARG7) \ builtin_types[(int) ENUM] \ - = build_function_type \ - (builtin_types[(int) RETURN], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG1], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG2], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG3], \ - tree_cons \ - (NULL_TREE, \ - builtin_types[(int) ARG4], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG5], \ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG6],\ - tree_cons (NULL_TREE, \ - builtin_types[(int) ARG6], \ - void_list_node)))))))); + = build_function_type_list (builtin_types[(int) RETURN], \ + builtin_types[(int) ARG1], \ + builtin_types[(int) ARG2], \ + builtin_types[(int) ARG3], \ + builtin_types[(int) ARG4], \ + builtin_types[(int) ARG5], \ + builtin_types[(int) ARG6], \ + builtin_types[(int) ARG7], \ + NULL_TREE); #define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \ builtin_types[(int) ENUM] \ - = build_function_type (builtin_types[(int) RETURN], NULL_TREE); + = build_varargs_function_type_list (builtin_types[(int) RETURN], \ + NULL_TREE); #define DEF_POINTER_TYPE(ENUM, TYPE) \ builtin_types[(int) ENUM] \ = build_pointer_type (builtin_types[(int) TYPE]); -- cgit v1.2.1 From c758061281cf411adfba3b34ca5c3a6c6c2ec9a5 Mon Sep 17 00:00:00 2001 From: steven Date: Wed, 26 May 2010 09:52:03 +0000 Subject: * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159858 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index f7e0b4ff649..14525dc2552 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -43,11 +43,6 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic.h" #include "tree-dump.h" #include "cgraph.h" -/* For gfc_maybe_initialize_eh. */ -#include "libfuncs.h" -#include "expr.h" -#include "except.h" - #include "gfortran.h" #include "cpp.h" #include "trans.h" -- 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/fortran/f95-lang.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 14525dc2552..f76e75c4b1f 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -350,8 +350,7 @@ getdecls (void) void pushlevel (int ignore ATTRIBUTE_UNUSED) { - struct binding_level *newlevel - = (struct binding_level *) ggc_alloc (sizeof (struct binding_level)); + struct binding_level *newlevel = ggc_alloc_binding_level (); *newlevel = clear_binding_level; -- cgit v1.2.1 From 9e0a5037e5ef6125706bad548d0d5def983abb22 Mon Sep 17 00:00:00 2001 From: fxcoudert Date: Wed, 9 Jun 2010 10:17:56 +0000 Subject: PR fortran/43040 * f95-lang.c (gfc_init_builtin_functions): Remove comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160459 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index f76e75c4b1f..f31e846abe8 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -755,8 +755,6 @@ gfc_init_builtin_functions (void) #include "mathbuiltins.def" - /* We define these separately as the fortran versions have different - semantics (they return an integer type) */ gfc_define_builtin ("__builtin_roundl", mfunc_longdouble[0], BUILT_IN_ROUNDL, "roundl", true); gfc_define_builtin ("__builtin_round", mfunc_double[0], -- cgit v1.2.1 From a80ae91c5faa9044bba4283050db6824b1b7c448 Mon Sep 17 00:00:00 2001 From: fxcoudert Date: Fri, 11 Jun 2010 19:35:19 +0000 Subject: * mathbuiltins.def: Add builtins that do not directly correspond to a Fortran intrinsic, with new macro OTHER_BUILTIN. * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN. * trans-intrinsic.c (gfc_intrinsic_map_t): Remove code_{r,c}{4,8,10,16} fields. Add {,complex}{float,double,long_double}_built_in fields. (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add definition of OTHER_BUILTIN. (real_compnt_info): Remove unused struct. (builtin_decl_for_precision, builtin_decl_for_float_kind): New functions. (build_round_expr): Call builtin_decl_for_precision instead of series of if-else. (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind instead of a switch. (gfc_build_intrinsic_lib_fndecls): Match {real,complex}{4,8,10,16}decl into the C-style built_in_decls. (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point kinds. (gfc_conv_intrinsic_lib_function): Go through all the extended gfc_intrinsic_map. (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind instead of a switch. (gfc_conv_intrinsic_abs): Likewise. (gfc_conv_intrinsic_mod): Likewise. (gfc_conv_intrinsic_sign): Likewise. (gfc_conv_intrinsic_fraction): Likewise. (gfc_conv_intrinsic_nearest): Likewise. (gfc_conv_intrinsic_spacing): Likewise. (gfc_conv_intrinsic_rrspacing): Likewise. (gfc_conv_intrinsic_scale): Likewise. (gfc_conv_intrinsic_set_exponent): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160628 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index f31e846abe8..a97016a6923 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -753,6 +753,9 @@ gfc_init_builtin_functions (void) func_longdouble_longdoublep_longdoublep = build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); +/* Non-math builtins are defined manually, so they're not included here. */ +#define OTHER_BUILTIN(ID,NAME,TYPE) + #include "mathbuiltins.def" gfc_define_builtin ("__builtin_roundl", mfunc_longdouble[0], -- cgit v1.2.1 From 4ad7515928723c066cc9e064a4ac2a98c3dd5066 Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 15 Jun 2010 12:15:26 +0000 Subject: PR fortran/44536 * langhooks.h (struct lang_hooks_for_decls): Add omp_report_decl. * langhooks-def.h (LANG_HOOKS_OMP_REPORT_DECL): Define. (LANG_HOOKS_DECLS): Add it. * gimplify.c (omp_notice_variable): Call lang_hooks.decls.omp_report_decl. * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return OMP_CLAUSE_DEFAULT_SHARED for artificial vars with GFC_DECL_SAVED_DESCRIPTOR set. (gfc_omp_report_decl): New function. * trans.h (gfc_omp_report_decl): New prototype. * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine. * gfortran.dg/gomp/pr44536.f90: New test. * gfortran.dg/gomp/sharing-3.f90: Remove xfail. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160779 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index a97016a6923..c6af0026ba8 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -111,6 +111,7 @@ static void gfc_init_ts (void); #undef LANG_HOOKS_INIT_TS #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING +#undef LANG_HOOKS_OMP_REPORT_DECL #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR #undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR #undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP @@ -137,6 +138,7 @@ static void gfc_init_ts (void); #define LANG_HOOKS_INIT_TS gfc_init_ts #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE gfc_omp_privatize_by_reference #define LANG_HOOKS_OMP_PREDETERMINED_SHARING gfc_omp_predetermined_sharing +#define LANG_HOOKS_OMP_REPORT_DECL gfc_omp_report_decl #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR gfc_omp_clause_default_ctor #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR gfc_omp_clause_copy_ctor #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP gfc_omp_clause_assign_op -- cgit v1.2.1 From 1767a056f10a2ccbc900df04d01193da73a3d272 Mon Sep 17 00:00:00 2001 From: froydnj Date: Thu, 15 Jul 2010 14:31:28 +0000 Subject: gcc/ * tree.h (DECL_CHAIN): Define. * alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-decl.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. * cfgexpand.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/frv/frv.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/som.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimplify.c: Likewise. * integrate.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.c: Likewise. * langhooks.c: Likewise. * lto-cgraph.c: Likewise. * omp-low.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-complex.c: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-inline.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-object-size.c: Likewise. * tree-pretty-print.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-tailcall.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. gcc/c-family/ * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * c-format.c: Likewise. gcc/cp/ * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * call.c: Likewise. * class.c: Likewise. * cp-gimplify.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * init.c: Likewise. * mangle.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN. * trans-common.c: Likewise. * trans-decl.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. gcc/java/ * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. * boehm.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. gcc/objc/ * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN. gcc/testsuite/ * g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN with DECL_CHAIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162223 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/f95-lang.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/f95-lang.c') diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index c6af0026ba8..5b676214e6a 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -310,7 +310,7 @@ struct GTY(()) binding_level { /* A chain of ..._DECL nodes for all variables, constants, functions, parameters and type declarations. These ..._DECL nodes are chained - through the TREE_CHAIN field. Note that these ..._DECL nodes are stored + through the DECL_CHAIN field. Note that these ..._DECL nodes are stored in the reverse of the order supplied to be compatible with the back-end. */ tree names; @@ -409,7 +409,7 @@ poplevel (int keep, int reverse, int functionbody) /* Clear out the meanings of the local variables of this level. */ for (subblock_node = decl_chain; subblock_node; - subblock_node = TREE_CHAIN (subblock_node)) + subblock_node = DECL_CHAIN (subblock_node)) if (DECL_NAME (subblock_node) != 0) /* If the identifier was used or addressed via a local extern decl, don't forget that fact. */ @@ -467,7 +467,7 @@ pushdecl (tree decl) order. The list will be reversed later if necessary. This needs to be this way for compatibility with the back-end. */ - TREE_CHAIN (decl) = current_binding_level->names; + DECL_CHAIN (decl) = current_binding_level->names; current_binding_level->names = decl; /* For the declaration of a type, set its name if it is not already set. */ -- cgit v1.2.1