View | Edit | Raw Unified
Collapse All | Expand All | Context: (Patch / File /
)

(-) java/typeck.c (-1 / +8 lines)
 Lines 236-242   java_unsigned_type (tree type) Link Here 
   Value is true if successful.  */
   Value is true if successful.  */
bool
bool
java_mark_addressable (tree exp)
java_try_mark_addressable (tree exp, bool cancel_regdecl ATTRIBUTE_UNUSED)
{
{
  tree x = exp;
  tree x = exp;
  while (1)
  while (1)
 Lines 296-301   java_mark_addressable (tree exp) Link Here 
    }
    }
}
}
/* Same as above, without the unused parameter.  */
bool
java_mark_addressable (tree exp)
{
  return java_try_mark_addressable (exp, false);
}
/* Thorough checking of the arrayness of TYPE.  */
/* Thorough checking of the arrayness of TYPE.  */
int
int
(-) java/lang.c (+2 lines)
 Lines 167-172   struct language_function GTY(()) Link Here 
#define LANG_HOOKS_POST_OPTIONS java_post_options
#define LANG_HOOKS_POST_OPTIONS java_post_options
#undef LANG_HOOKS_PARSE_FILE
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE java_parse_file
#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_TRY_MARK_ADDRESSABLE
#define LANG_HOOKS_TRY_MARK_ADDRESSABLE java_try_mark_addressable
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
(-) java/java-tree.h (+1 lines)
 Lines 1151-1156   struct lang_type GTY(()) Link Here 
struct eh_range;
struct eh_range;
extern void java_parse_file (int);
extern void java_parse_file (int);
extern bool java_try_mark_addressable (tree, bool);
extern bool java_mark_addressable (tree);
extern bool java_mark_addressable (tree);
extern tree java_type_for_mode (enum machine_mode, int);
extern tree java_type_for_mode (enum machine_mode, int);
extern tree java_type_for_size (unsigned int, int);
extern tree java_type_for_size (unsigned int, int);
(-) cp/typeck.c (-9 / +37 lines)
 Lines 4390-4400   unary_complex_lvalue (enum tree_code cod Link Here 
/* Mark EXP saying that we need to be able to take the
/* Mark EXP saying that we need to be able to take the
   address of it; it should not be allocated in a register.
   address of it; it should not be allocated in a register.
   Value is true if successful.
   Value is true if successful.
   If CANCEL_REGDECL is set, ignore register declarations for local
   variables / parameters unless a specific hard register was requested.
   If EMIT_DIAGNOSTICS is set, emit warnings / errors.
   C++: we do not allow `current_class_ptr' to be addressable.  */
   C++: we do not allow `current_class_ptr' to be addressable.  */
bool
static bool
cxx_mark_addressable (tree exp)
cxx_mark_addressable_internal (tree exp, bool cancel_regdecl,
			       bool emit_diagnostics)
{
{
  tree x = exp;
  tree x = exp;
 Lines 4412-4420   cxx_mark_addressable (tree exp) Link Here 
      case PARM_DECL:
      case PARM_DECL:
	if (x == current_class_ptr)
	if (x == current_class_ptr)
	  {
	  {
	    error ("cannot take the address of %<this%>, which is an rvalue expression");
	    if (emit_diagnostics)
	    TREE_ADDRESSABLE (x) = 1; /* so compiler doesn't die later.  */
	      {
	    return true;
		error ("cannot take the address of %<this%>, which is an rvalue expression");
		TREE_ADDRESSABLE (x) = 1; /* so compiler doesn't die later.  */
		return true;
	      }
	    else
	      return false;
	  }
	  }
	/* Fall through.  */
	/* Fall through.  */
 Lines 4434-4446   cxx_mark_addressable (tree exp) Link Here 
	  {
	  {
	    if (TREE_CODE (x) == VAR_DECL && DECL_HARD_REGISTER (x))
	    if (TREE_CODE (x) == VAR_DECL && DECL_HARD_REGISTER (x))
	      {
	      {
		error
		if (emit_diagnostics)
		  ("address of explicit register variable %qD requested", x);
		  error
		    ("address of explicit register variable %qD requested", x);
		return false;
		return false;
	      }
	      }
	    else if (extra_warnings)
	    else if (emit_diagnostics && extra_warnings)
	      warning
	      warning
		(0, "address requested for %qD, which is declared %<register%>", x);
		(0, "address requested for %qD, which is declared %<register%>",
		 x);
	    if (!cancel_regdecl)
	      return false;
	  }
	  }
	TREE_ADDRESSABLE (x) = 1;
	TREE_ADDRESSABLE (x) = 1;
	return true;
	return true;
 Lines 4462-4467   cxx_mark_addressable (tree exp) Link Here 
	return true;
	return true;
    }
    }
}
}
/* Likewise, but don't provide option of emitting diagnostics.  */
bool
cxx_try_mark_addressable (tree exp, bool cancel_regdecl)
{
  return cxx_mark_addressable_internal (exp, cancel_regdecl, false);
}
/* Likewise, but always cancel register declarations unless they specify
   a specific registyer, and always emit diagnostics.  */
bool
cxx_mark_addressable (tree exp)
{
  return cxx_mark_addressable_internal (exp, true, true);
}


/* Build and return a conditional expression IFEXP ? OP1 : OP2.  */
/* Build and return a conditional expression IFEXP ? OP1 : OP2.  */
(-) cp/cp-objcp-common.h (+2 lines)
 Lines 63-68   extern tree objcp_tsubst_copy_and_build Link Here 
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
#undef LANG_HOOKS_TRY_MARK_ADDRESSABLE
#define LANG_HOOKS_TRY_MARK_ADDRESSABLE cxx_try_mark_addressable
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE cxx_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE cxx_mark_addressable
#undef LANG_HOOKS_PRINT_STATISTICS
#undef LANG_HOOKS_PRINT_STATISTICS
(-) cp/cp-tree.h (+1 lines)
 Lines 3772-3777   extern tree pushdecl_maybe_friend (tree Link Here 
extern void cxx_init_decl_processing		(void);
extern void cxx_init_decl_processing		(void);
enum cp_tree_node_structure_enum cp_tree_node_structure
enum cp_tree_node_structure_enum cp_tree_node_structure
						(union lang_tree_node *);
						(union lang_tree_node *);
extern bool cxx_try_mark_addressable		(tree, bool);
extern bool cxx_mark_addressable		(tree);
extern bool cxx_mark_addressable		(tree);
extern void cxx_push_function_context		(struct function *);
extern void cxx_push_function_context		(struct function *);
extern void cxx_pop_function_context		(struct function *);
extern void cxx_pop_function_context		(struct function *);
(-) c-objc-common.h (+2 lines)
 Lines 48-53   extern void c_initialize_diagnostics (di Link Here 
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#define LANG_HOOKS_EXPAND_EXPR c_expand_expr
#undef LANG_HOOKS_EXPAND_DECL
#undef LANG_HOOKS_EXPAND_DECL
#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#define LANG_HOOKS_EXPAND_DECL c_expand_decl
#undef LANG_HOOKS_TRY_MARK_ADDRESSABLE
#define LANG_HOOKS_TRY_MARK_ADDRESSABLE c_try_mark_addressable
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE
#undef LANG_HOOKS_PARSE_FILE
(-) c-tree.h (+1 lines)
 Lines 524-529   extern struct c_label_context_vm *label_ Link Here 
extern tree require_complete_type (tree);
extern tree require_complete_type (tree);
extern int same_translation_unit_p (tree, tree);
extern int same_translation_unit_p (tree, tree);
extern int comptypes (tree, tree);
extern int comptypes (tree, tree);
extern bool c_try_mark_addressable (tree, bool);
extern bool c_mark_addressable (tree);
extern bool c_mark_addressable (tree);
extern void c_incomplete_type_error (tree, tree);
extern void c_incomplete_type_error (tree, tree);
extern tree c_type_promotes_to (tree);
extern tree c_type_promotes_to (tree);
(-) ada/misc.c (+2 lines)
 Lines 134-139   static tree gnat_type_max_size (tree); Link Here 
#define LANG_HOOKS_GET_ALIAS_SET	gnat_get_alias_set
#define LANG_HOOKS_GET_ALIAS_SET	gnat_get_alias_set
#undef  LANG_HOOKS_EXPAND_EXPR
#undef  LANG_HOOKS_EXPAND_EXPR
#define LANG_HOOKS_EXPAND_EXPR		gnat_expand_expr
#define LANG_HOOKS_EXPAND_EXPR		gnat_expand_expr
#undef  LANG_HOOKS_TRY_MARK_ADDRESSABLE
#define LANG_HOOKS_TRY_MARK_ADDRESSABLE	gnat_try_mark_addressable
#undef  LANG_HOOKS_MARK_ADDRESSABLE
#undef  LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE	gnat_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE	gnat_mark_addressable
#undef  LANG_HOOKS_PRINT_DECL
#undef  LANG_HOOKS_PRINT_DECL
(-) ada/utils2.c (-1 / +9 lines)
 Lines 2012-2018   fill_vms_descriptor (tree expr, Entity_I Link Here 
   should not be allocated in a register.  Returns true if successful.  */
   should not be allocated in a register.  Returns true if successful.  */
bool
bool
gnat_mark_addressable (tree expr_node)
gnat_try_mark_addressable (tree expr_node,
			   bool cancel_regdecl ATTRIBUTE_UNUSED)
{
{
  while (1)
  while (1)
    switch (TREE_CODE (expr_node))
    switch (TREE_CODE (expr_node))
 Lines 2052-2054   gnat_mark_addressable (tree expr_node) Link Here 
	return true;
	return true;
    }
    }
}
}
/* Likewise, but without the dummy parameter.  */
bool
gnat_mark_addressable (tree expr_node)
{
  return gnat_try_mark_addressable (tree expr_node, false)
}
(-) ada/gigi.h (+5 lines)
 Lines 756-761   extern tree build_allocator (tree type, Link Here 
extern tree fill_vms_descriptor (tree expr, Entity_Id gnat_formal);
extern tree fill_vms_descriptor (tree expr, Entity_Id gnat_formal);
/* Try to indicate that we need to make the address of EXPR_NODE and it
   therefore should not be allocated in a register.  Return true if
   successful.  */
extern bool gnat_try_mark_addressable (tree expr_node, bool);
/* Indicate that we need to make the address of EXPR_NODE and it therefore
/* Indicate that we need to make the address of EXPR_NODE and it therefore
   should not be allocated in a register.  Return true if successful.  */
   should not be allocated in a register.  Return true if successful.  */
extern bool gnat_mark_addressable (tree expr_node);
extern bool gnat_mark_addressable (tree expr_node);
(-) fortran/f95-lang.c (-9 / +36 lines)
 Lines 92-97   static void gfc_init_builtin_functions ( Link Here 
static bool gfc_init (void);
static bool gfc_init (void);
static void gfc_finish (void);
static void gfc_finish (void);
static void gfc_print_identifier (FILE *, tree, int);
static void gfc_print_identifier (FILE *, tree, int);
static bool gfc_try_mark_addressable (tree, bool);
static bool gfc_mark_addressable (tree);
static bool gfc_mark_addressable (tree);
void do_function_end (void);
void do_function_end (void);
int global_bindings_p (void);
int global_bindings_p (void);
 Lines 108-113   static void gfc_expand_function (tree); Link Here 
#undef LANG_HOOKS_POST_OPTIONS
#undef LANG_HOOKS_POST_OPTIONS
#undef LANG_HOOKS_PRINT_IDENTIFIER
#undef LANG_HOOKS_PRINT_IDENTIFIER
#undef LANG_HOOKS_PARSE_FILE
#undef LANG_HOOKS_PARSE_FILE
#undef LANG_HOOKS_TRY_MARK_ADDRESSABLE
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_TYPE_FOR_MODE
#undef LANG_HOOKS_TYPE_FOR_MODE
#undef LANG_HOOKS_TYPE_FOR_SIZE
#undef LANG_HOOKS_TYPE_FOR_SIZE
 Lines 126-131   static void gfc_expand_function (tree); Link Here 
#define LANG_HOOKS_POST_OPTIONS		gfc_post_options
#define LANG_HOOKS_POST_OPTIONS		gfc_post_options
#define LANG_HOOKS_PRINT_IDENTIFIER     gfc_print_identifier
#define LANG_HOOKS_PRINT_IDENTIFIER     gfc_print_identifier
#define LANG_HOOKS_PARSE_FILE           gfc_be_parse_file
#define LANG_HOOKS_PARSE_FILE           gfc_be_parse_file
#define LANG_HOOKS_TRY_MARK_ADDRESSABLE    gfc_try_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE        gfc_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE        gfc_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE           gfc_type_for_mode
#define LANG_HOOKS_TYPE_FOR_MODE           gfc_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE           gfc_type_for_size
#define LANG_HOOKS_TYPE_FOR_SIZE           gfc_type_for_size
 Lines 612-620   gfc_init_decl_processing (void) Link Here 
   the TARGET attribute, but we implement it here for a
   the TARGET attribute, but we implement it here for a
   likely future Cray pointer extension.
   likely future Cray pointer extension.
   Value is 1 if successful.  */
   Value is 1 if successful.  */
   If CANCEL_REGDECL is set, ignore register declarations for local
   variables / parameters unless a specific hard register was requested.
   If EMIT_DIAGNOSTICS is set, emit warnings / errors.
/* TODO: Check/fix mark_addressable.  */
/* TODO: Check/fix mark_addressable.  */
bool
/* ??? When diagnostics are requested, we sometimes lie about the success.  */
gfc_mark_addressable (tree exp)
static bool
gfc_mark_addressable_internal (tree exp, bool cancel_regdecl,
			       bool emit_diagnostics)
{
{
  register tree x = exp;
  register tree x = exp;
  while (1)
  while (1)
 Lines 640-657   gfc_mark_addressable (tree exp) Link Here 
	  {
	  {
	    if (TREE_PUBLIC (x))
	    if (TREE_PUBLIC (x))
	      {
	      {
		error
		if (emit_diagnostics)
		  ("global register variable %qs used in nested function",
		  error
		   IDENTIFIER_POINTER (DECL_NAME (x)));
		    ("global register variable %qs used in nested function",
		     IDENTIFIER_POINTER (DECL_NAME (x)));
		return false;
		return false;
	      }
	      }
	    pedwarn ("register variable %qs used in nested function",
	    if (emit_diagnostics)
		     IDENTIFIER_POINTER (DECL_NAME (x)));
	      pedwarn ("register variable %qs used in nested function",
		       IDENTIFIER_POINTER (DECL_NAME (x)));
	  }
	  }
	else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
	else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
	  {
	  {
	    if (TREE_PUBLIC (x))
	    if (TREE_PUBLIC (x))
	      {
	      {
		if (!emit_diagnostics)
		  return false;
		error ("address of global register variable %qs requested",
		error ("address of global register variable %qs requested",
		       IDENTIFIER_POINTER (DECL_NAME (x)));
		       IDENTIFIER_POINTER (DECL_NAME (x)));
		return true;
		return true;
 Lines 670-677   gfc_mark_addressable (tree exp) Link Here 
	      }
	      }
#endif
#endif
	    pedwarn ("address of register variable %qs requested",
	    if (emit_diagnostics)
		     IDENTIFIER_POINTER (DECL_NAME (x)));
	      pedwarn ("address of register variable %qs requested",
		       IDENTIFIER_POINTER (DECL_NAME (x)));
	    if (!cancel_regdecl)
	      return false;
	  }
	  }
	/* drops in */
	/* drops in */
 Lines 683-688   gfc_mark_addressable (tree exp) Link Here 
      }
      }
}
}
static bool
gfc_try_mark_addressable (tree exp, cancel_regdecl)
{
  return gfc_mark_addressable_internal (tree exp, cancel_regdecl, false);
}
static bool
gfc_mark_addressable (tree exp)
{
  return gfc_mark_addressable_internal (tree exp, true, true);
}
/* press the big red button - garbage (ggc) collection is on */
/* press the big red button - garbage (ggc) collection is on */
int ggc_p = 1;
int ggc_p = 1;
(-) langhooks.h (+5 lines)
 Lines 328-333   struct lang_hooks Link Here 
     compilation.  Default hook is does nothing.  */
     compilation.  Default hook is does nothing.  */
  void (*finish_incomplete_decl) (tree);
  void (*finish_incomplete_decl) (tree);
  /* Try to mark EXP saying that we need to be able to take the address of
     it; it should not be allocated in a register.  Return true if
     successful.  */
  bool (*try_mark_addressable) (tree, bool);
  /* Mark EXP saying that we need to be able to take the address of
  /* Mark EXP saying that we need to be able to take the address of
     it; it should not be allocated in a register.  Return true if
     it; it should not be allocated in a register.  Return true if
     successful.  */
     successful.  */
(-) c-typeck.c (-10 / +42 lines)
 Lines 3120-3129   lvalue_or_else (tree ref, enum lvalue_us Link Here 


/* Mark EXP saying that we need to be able to take the
/* Mark EXP saying that we need to be able to take the
   address of it; it should not be allocated in a register.
   address of it; it should not be allocated in a register.
   Returns true if successful.  */
   Returns true if successful.
   If CANCEL_REGDECL is set, ignore register declarations for local
   variables / parameters unless a specific hard register was requested.
   If EMIT_DIAGNOSTICS is set, emit errors / warnings.  */
bool
static bool
c_mark_addressable (tree exp)
c_mark_addressable_internal (tree exp, bool cancel_regdecl,
			     bool emit_diagnostics)
{
{
  tree x = exp;
  tree x = exp;
 Lines 3133-3140   c_mark_addressable (tree exp) Link Here 
      case COMPONENT_REF:
      case COMPONENT_REF:
	if (DECL_C_BIT_FIELD (TREE_OPERAND (x, 1)))
	if (DECL_C_BIT_FIELD (TREE_OPERAND (x, 1)))
	  {
	  {
	    error
	    if (emit_diagnostics)
	      ("cannot take address of bit-field %qD", TREE_OPERAND (x, 1));
	      error ("cannot take address of bit-field %qD",
		     TREE_OPERAND (x, 1));
	    return false;
	    return false;
	  }
	  }
 Lines 3161-3177   c_mark_addressable (tree exp) Link Here 
	  {
	  {
	    if (TREE_PUBLIC (x) || TREE_STATIC (x) || DECL_EXTERNAL (x))
	    if (TREE_PUBLIC (x) || TREE_STATIC (x) || DECL_EXTERNAL (x))
	      {
	      {
		error
		if (emit_diagnostics)
		  ("global register variable %qD used in nested function", x);
		  error
		    ("global register variable %qD used in nested function", x);
		return false;
		return false;
	      }
	      }
	    pedwarn ("register variable %qD used in nested function", x);
	    if (emit_diagnostics)
	      pedwarn ("register variable %qD used in nested function", x);
	  }
	  }
	else if (C_DECL_REGISTER (x))
	else if (C_DECL_REGISTER (x))
	  {
	  {
	    if (TREE_PUBLIC (x) || TREE_STATIC (x) || DECL_EXTERNAL (x))
	    if (TREE_PUBLIC (x) || TREE_STATIC (x) || DECL_EXTERNAL (x))
	      error ("address of global register variable %qD requested", x);
	      {
	    else
		if (emit_diagnostics)
		  error ("address of global register variable %qD requested",
			 x);
	      }
	    else if (!DECL_REGISTER (x)
		     || (cancel_regdecl
			 && !(REG_P (DECL_RTL (x))
			      && REGNO (DECL_RTL (x)) < FIRST_PSEUDO_REGISTER)))
	      {
		DECL_REGISTER (x) = 0;
		TREE_ADDRESSABLE (x) = 1;
		return true;
	      }
	    else if (emit_diagnostics)
	      error ("address of register variable %qD requested", x);
	      error ("address of register variable %qD requested", x);
	    return false;
	    return false;
	  }
	  }
 Lines 3184-3189   c_mark_addressable (tree exp) Link Here 
	return true;
	return true;
    }
    }
}
}
bool
c_try_mark_addressable (tree exp, bool cancel_regdecl)
{
  return c_mark_addressable_internal (exp, cancel_regdecl, false);
}
bool
c_mark_addressable (tree exp)
{
  return c_mark_addressable_internal (exp, false, true);
}


/* Build and return a conditional expression IFEXP ? OP1 : OP2.  */
/* Build and return a conditional expression IFEXP ? OP1 : OP2.  */
(-) treelang/treetree.c (-7 / +35 lines)
 Lines 124-129   struct language_function GTY(()) Link Here 
  char junk; /* dummy field to ensure struct is not empty */
  char junk; /* dummy field to ensure struct is not empty */
};
};
static bool tree_try_mark_addressable (tree exp, bool);
static bool tree_mark_addressable (tree exp);
static bool tree_mark_addressable (tree exp);
static tree tree_lang_type_for_size (unsigned precision, int unsignedp);
static tree tree_lang_type_for_size (unsigned precision, int unsignedp);
static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp);
static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp);
 Lines 154-159   static void treelang_expand_function (tr Link Here 
   end).  These are not really very language-dependent, i.e.
   end).  These are not really very language-dependent, i.e.
   treelang, C, Mercury, etc. can all use almost the same definitions.  */
   treelang, C, Mercury, etc. can all use almost the same definitions.  */
#undef LANG_HOOKS_TRY_MARK_ADDRESSABLE
#define LANG_HOOKS_TRY_MARK_ADDRESSABLE tree_try_mark_addressable
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE tree_mark_addressable
#define LANG_HOOKS_MARK_ADDRESSABLE tree_mark_addressable
#undef LANG_HOOKS_SIGNED_TYPE
#undef LANG_HOOKS_SIGNED_TYPE
 Lines 779-789   static GTY(()) tree signed_and_unsigned_ Link Here 
/* Mark EXP saying that we need to be able to take the
/* Mark EXP saying that we need to be able to take the
   address of it; it should not be allocated in a register.
   address of it; it should not be allocated in a register.
   Value is 1 if successful.  
   Value is 1 if successful.  
   If CANCEL_REGDECL is set, ignore register declarations for local
   variables / parameters unless a specific hard register was requested.
   
   
   This implementation was copied from c-decl.c. */
   This implementation was copied from c-decl.c. */
static bool
static bool
tree_mark_addressable (tree exp)
tree_mark_addressable_internal (tree exp, bool cancel_regdecl,
				bool emit_diagnostics)
{
{
  register tree x = exp;
  register tree x = exp;
  while (1)
  while (1)
 Lines 810-831   tree_mark_addressable (tree exp) Link Here 
	  {
	  {
	    if (TREE_PUBLIC (x))
	    if (TREE_PUBLIC (x))
	      {
	      {
		error ("Global register variable %qD used in nested function.",
		if (emit_diagnostics)
		       x);
		  error
		    ("Global register variable %qD used in nested function.",
		     x);
		return 0;
		return 0;
	      }
	      }
	    pedwarn ("Register variable %qD used in nested function.", x);
	    if (emit_diagnostics)
	      pedwarn ("Register variable %qD used in nested function.", x);
	  }
	  }
	else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
	else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
	  {
	  {
	    if (TREE_PUBLIC (x))
	    if (TREE_PUBLIC (x))
	      {
	      {
		error ("Address of global register variable %qD requested.",
		if (emit_diagnostics)
		       x);
		  error ("Address of global register variable %qD requested.",
			 x);
		return 0;
		return 0;
	      }
	      }
	    pedwarn ("Address of register variable %qD requested.", x);
	    if (emit_diagnostics)
	      pedwarn ("Address of register variable %qD requested.", x);
	    if (!cancel_regdecls)
	      return false;
	  }
	  }
	/* drops in */
	/* drops in */
 Lines 837-842   tree_mark_addressable (tree exp) Link Here 
    }
    }
}
}
  
  
/* Likewise, but don't provide option of emitting diagnostics.  */
static bool
tree_try_mark_addressable (tree exp, bool cancel_regdecl)
{
  return tree_mark_addressable_internal (exp, cancel_regdecl, false);
}
/* Likewise, but always cancel register declarations unless they specify
   a specific registyer, and always emit diagnostics.  */
static bool
tree_mark_addressable (tree exp)
{
  return tree_mark_addressable_internal (exp, true, true);
}
/* Return an integer type with the number of bits of precision given by  
/* Return an integer type with the number of bits of precision given by  
   PRECISION.  UNSIGNEDP is nonzero if the type is unsigned; otherwise
   PRECISION.  UNSIGNEDP is nonzero if the type is unsigned; otherwise
   it is a signed type.  */
   it is a signed type.  */
(-) langhooks-def.h (+1 lines)
 Lines 296-301   extern tree lhd_make_node (enum tree_cod Link Here 
  LANG_HOOKS_EXPAND_DECL, \
  LANG_HOOKS_EXPAND_DECL, \
  LANG_HOOKS_SAFE_FROM_P, \
  LANG_HOOKS_SAFE_FROM_P, \
  LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
  LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
  LANG_HOOKS_TRY_MARK_ADDRESSABLE, \
  LANG_HOOKS_MARK_ADDRESSABLE, \
  LANG_HOOKS_MARK_ADDRESSABLE, \
  LANG_HOOKS_STATICP, \
  LANG_HOOKS_STATICP, \
  LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
  LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \