diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2007-07-09 19:41:37 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2007-07-09 19:41:37 +0000 |
commit | e1cc194c0387dd0ad9fa403429283f89aba293cf (patch) | |
tree | 8e91729786ea2797b67de1619df7e5af6efeaf90 /gcc | |
parent | 694dd537b964f0a5869c9519f3968a6eddea827a (diff) | |
download | gcc-e1cc194c0387dd0ad9fa403429283f89aba293cf.zip gcc-e1cc194c0387dd0ad9fa403429283f89aba293cf.tar.gz gcc-e1cc194c0387dd0ad9fa403429283f89aba293cf.tar.bz2 |
trans-decl.c (set_tree_decl_type_code): Remove function.
2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
* trans-decl.c (set_tree_decl_type_code): Remove function.
(generate_local_decl): Remove reference to set_tree_decl_type_code.
From-SVN: r126493
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 44 |
2 files changed, 5 insertions, 44 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 70c4f83..5f414f7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org> + + * trans-decl.c (set_tree_decl_type_code): Remove function. + (generate_local_decl): Remove reference to set_tree_decl_type_code. + 2007-07-09 Daniel Franke <franke.daniel@gmail.com> PR fortran/31129 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 608b779..5a7ad254 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2840,41 +2840,6 @@ gfc_generate_contained_functions (gfc_namespace * parent) } -/* Set up the tree type for the given symbol to allow the dummy - variable (parameter) to be passed by-value. To do this, the main - idea is to simply remove the extra layer added by Fortran - automatically (the POINTER_TYPE node). This pointer type node - would normally just contain the real type underneath, but we remove - it here and later we change the way the argument is converted for a - function call (trans-expr.c:gfc_conv_function_call). This is the - approach the C compiler takes (or it appears to be this way). When - the middle-end is given the typed node rather than the POINTER_TYPE - node, it knows to pass the value. */ - -static void -set_tree_decl_type_code (gfc_symbol *sym) -{ - /* This should not happen. during the gfc_sym_type function, - when the backend_decl is being built for a dummy arg, if the arg - is pass-by-value then no reference type is wrapped around the - true type (e.g., REAL_TYPE). */ - if (TREE_CODE (TREE_TYPE (sym->backend_decl)) == POINTER_TYPE || - TREE_CODE (TREE_TYPE (sym->backend_decl)) == REFERENCE_TYPE) - TREE_TYPE (sym->backend_decl) = gfc_typenode_for_spec (&sym->ts); - DECL_BY_REFERENCE (sym->backend_decl) = 0; - - /* the tree can't be addressable if it's pass-by-value..? x*/ -/* TREE_TYPE(sym->backend_decl)->common.addressable_flag = 0; */ - - DECL_ARG_TYPE (sym->backend_decl) = TREE_TYPE (sym->backend_decl); - - DECL_MODE (sym->backend_decl) = - TYPE_MODE (TREE_TYPE (sym->backend_decl)); - - return; -} - - /* Drill down through expressions for the array specification bounds and character length calling generate_local_decl for all those variables that have not already been declared. */ @@ -3044,15 +3009,6 @@ generate_local_decl (gfc_symbol * sym) &sym->declared_at); } - if (sym->attr.dummy == 1) - { - /* The sym->backend_decl can be NULL if this is one of the - intrinsic types, such as the symbol of type c_ptr for the - c_f_pointer function, so don't set up the tree code for it. */ - if (sym->attr.value == 1 && sym->backend_decl != NULL) - set_tree_decl_type_code (sym); - } - /* Make sure we convert the types of the derived types from iso_c_binding into (void *). */ if (sym->attr.flavor != FL_PROCEDURE && sym->attr.is_iso_c |