diff options
author | espindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-23 19:47:58 +0000 |
---|---|---|
committer | espindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-23 19:47:58 +0000 |
commit | 54be5d7e4e5aaee714a12a972bcf5ba628e5a239 (patch) | |
tree | db6d791ee7b718303aa5b8c1eacfff0daaa114c9 /gcc/fortran | |
parent | b356dfef7e02914fdff0b675eacf431c121c6e85 (diff) | |
download | gcc-54be5d7e4e5aaee714a12a972bcf5ba628e5a239.tar.gz |
* gcc/java/decl.c: Include langhooks.h.
(builtin_function): Remove.
(java_init_decl_processing): Replace calls to builtin_function
with add_builtin_function.
* gcc/java/Make-lang.in (jc1$(exeext)): Depend on and link with
attribs.o.
(java/decl.o): Depend on langhooks.h.
* gcc/java/java-tree.h (builtin_function): Remove.
* gcc/tree.c (local_define_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/objc/objc-act.c (synth_module_prologue): Replace calls to
builtin_function with add_builtin_function.
(build_next_objc_exception_stuff): Replace calls to
builtin_function with add_builtin_function.
(build_objc_exception_stuff): Replace calls to
builtin_function with add_builtin_function.
* gcc/objcp/objcp-decl.h (objcp_builtin_function): Remove.
* gcc/cp/decl.c (builtin_function_1): Move common code to
add_builtin_function.
(builtin_function): Rename to cxx_builtin_function.
Change the signature.
* gcc/cp/call.c: Include langhooks.h.
(build_java_interface_fn_ref): Replace calls to
builtin_function with add_builtin_function.
* gcc/cp/Make-lang.in (cp/call.o): Depend on langhooks.h.
* gcc/cp/cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
cxx_builtin_function.
* gcc/cp/cp-tree.h (builtin_function): Rename to cxx_builtin_function.
Change the signature.
* gcc/c-objc-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
c_builtin_function.
* gcc/c-tree.h (builtin_function): Rename to c_builtin_function. Change
the signature.
* gcc/ada/utils.c (builtin_function): Rename to gnat_builtin_function.
Move common code to add_builtin_function.
* gcc/ada/misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
gnat_builtin_function.
* gcc/ada/gigi.h (builtin_function): Rename to gnat_builtin_function.
Change the signature.
* gcc/c-decl.c (builtin_function): Rename to c_builtin_function. Move
common code to add_builtin_function.
* gcc/fortran/Make-lang.in (f951$(exeext)): Depend on and link with
attribs.o.
* gcc/fortran/trans.h (builtin_function): Rename to
gfc_builtin_function. Change the signature.
* gcc/fortran/f95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
gfc_builtin_function.
(builtin_function): Rename to gfc_builtin_function. Move common
code to builtin_function.
(gfc_define_builtin): Replace calls to builtin_function with
gfc_define_builtin.
* gcc/langhooks.c (add_builtin_function): New function.
(lhd_builtin_function): New function.
* gcc/langhooks.h (struct lang_hooks): Change the signature of
builtin_function.
(add_builtin_function): New function.
* gcc/treelang/treetree.c (builtin_function): Remove.
* gcc/tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Replace
calls to lang_hooks.builtin_function with add_builtin_function.
* gcc/c-common.c (decl_builtin_1): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/alpha/alpha.c (alpha_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/frv/frv.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/s390/s390.c (s390_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/sparc/sparc.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/i386/i386.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
(def_builtin): Replace calls to lang_hooks.builtin_function with
add_builtin_function.
* gcc/config/sh/sh.c (sh_media_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/c4x/c4x.c (c4x_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/stormy16/stormy16.c (xstormy16_init_builtins):
Replace calls to lang_hooks.builtin_function with
add_builtin_function.
* gcc/config/iq2000/iq2000.c (def_builtin):
Replace calls to lang_hooks.builtin_function with
add_builtin_function.
* gcc/config/ia64/ia64.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/rs6000/rs6000.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
(altivec_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/arm/arm.c (def_mbuiltin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
(arm_init_tls_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/mips/mips.c (mips_init_builtins): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/config/bfin/bfin.c (def_builtin): Replace calls to
lang_hooks.builtin_function with add_builtin_function.
* gcc/langhooks-def.h (lhd_builtin_function): New function.
(LANG_HOOKS_BUILTIN_FUNCTION): Define as lhd_builtin_function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/fortran/Make-lang.in | 4 | ||||
-rw-r--r-- | gcc/fortran/f95-lang.c | 40 | ||||
-rw-r--r-- | gcc/fortran/trans.h | 3 |
4 files changed, 20 insertions, 39 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 53b7b300764..630ffe04872 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,15 @@ +2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com> + + * Make-lang.in (f951$(exeext)): Depend on and link with attribs.o. + * trans.h (builtin_function): Rename to gfc_builtin_function. + Change the signature. + * 95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as + gfc_builtin_function. + (builtin_function): Rename to gfc_builtin_function. Move common + code to builtin_function. + (gfc_define_builtin): Replace calls to builtin_function with + gfc_define_builtin. + 2006-10-22 Francois-Xavier Coudert <coudert@clipper.ens.fr> PR fortran/26025 diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in index cc38e69b140..f99f0be0b9c 100644 --- a/gcc/fortran/Make-lang.in +++ b/gcc/fortran/Make-lang.in @@ -102,9 +102,9 @@ gfortran-cross$(exeext): gfortran$(exeext) # The compiler itself is called f951. f951$(exeext): $(F95_OBJS) \ - $(BACKEND) $(LIBDEPS) + $(BACKEND) $(LIBDEPS) attribs.o $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ - $(F95_OBJS) $(BACKEND) $(LIBS) + $(F95_OBJS) $(BACKEND) $(LIBS) attribs.o gt-fortran-trans.h : s-gtype; @true # diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index fb626f70446..263d6eefe39 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -124,6 +124,7 @@ static HOST_WIDE_INT gfc_get_alias_set (tree); #undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR #undef LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE #undef LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES +#undef LANG_HOOKS_BUILTIN_FUNCTION /* Define lang hooks. */ #define LANG_HOOKS_NAME "GNU F95" @@ -150,6 +151,7 @@ static HOST_WIDE_INT gfc_get_alias_set (tree); #define LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE gfc_omp_private_debug_clause #define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \ gfc_omp_firstprivatize_type_sizes +#define LANG_HOOKS_BUILTIN_FUNCTION gfc_builtin_function const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; @@ -723,43 +725,11 @@ int ggc_p = 1; /* Builtin function initialization. */ -/* Return a definition for a builtin function named NAME and whose data type - is TYPE. TYPE should be a function type with argument types. - FUNCTION_CODE tells later passes how to compile calls to this function. - See tree.h for its possible values. - - If LIBRARY_NAME is nonzero, use that for DECL_ASSEMBLER_NAME, - the name to be called if we can't opencode the function. If - ATTRS is nonzero, use that for the function's attribute list. */ - tree -builtin_function (const char *name, - tree type, - int function_code, - enum built_in_class class, - const char *library_name, - tree attrs) +gfc_builtin_function (tree decl) { - tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); - DECL_EXTERNAL (decl) = 1; - TREE_PUBLIC (decl) = 1; - if (library_name) - SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name)); make_decl_rtl (decl); pushdecl (decl); - DECL_BUILT_IN_CLASS (decl) = class; - DECL_FUNCTION_CODE (decl) = function_code; - - /* Possibly apply some default attributes to this built-in function. */ - if (attrs) - { - /* FORNOW the only supported attribute is "const". If others need - to be supported then see the more general solution in procedure - builtin_function in c-decl.c */ - if (lookup_attribute ( "const", attrs )) - TREE_READONLY (decl) = 1; - } - return decl; } @@ -773,8 +743,8 @@ gfc_define_builtin (const char * name, { tree decl; - decl = builtin_function (name, type, code, BUILT_IN_NORMAL, - library_name, NULL_TREE); + decl = add_builtin_function (name, type, code, BUILT_IN_NORMAL, + library_name, NULL_TREE); if (const_p) TREE_READONLY (decl) = 1; diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index e8bb1d5d6aa..f471f093af9 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -446,8 +446,7 @@ void pushlevel (int); tree poplevel (int, int, int); tree getdecls (void); tree gfc_truthvalue_conversion (tree); -tree builtin_function (const char *, tree, int, enum built_in_class, - const char *, tree); +tree gfc_builtin_function (tree); /* In trans-openmp.c */ bool gfc_omp_privatize_by_reference (tree); |