diff options
author | Richard Guenther <rguenther@suse.de> | 2009-09-01 08:38:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-09-01 08:38:10 +0000 |
commit | 58f986ca91089e045b33129a6525bc0e399431e5 (patch) | |
tree | 7b75c3f77fdca843c801160365568addd7ee492a /gcc/fortran/f95-lang.c | |
parent | 5fa162c0d1065408634dd5df4a58407f35109b4d (diff) | |
download | gcc-58f986ca91089e045b33129a6525bc0e399431e5.zip gcc-58f986ca91089e045b33129a6525bc0e399431e5.tar.gz gcc-58f986ca91089e045b33129a6525bc0e399431e5.tar.bz2 |
tree-flow.h (mark_addressable): Move declaration ...
2009-09-01 Richard Guenther <rguenther@suse.de>
* 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.
From-SVN: r151260
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r-- | gcc/fortran/f95-lang.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index f9d1878..181f0fc 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. */ |