summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-09 19:41:37 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-09 19:41:37 +0000
commite46d7935d78d14a64b88f6fc335c850de30466c0 (patch)
tree8e91729786ea2797b67de1619df7e5af6efeaf90 /gcc/fortran/trans-decl.c
parent924eff81607944b725f3925512d4d385133ecd1d (diff)
downloadgcc-e46d7935d78d14a64b88f6fc335c850de30466c0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 608b779cd25..5a7ad254a2e 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