aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-10-23 22:59:52 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-10-23 18:59:52 -0400
commit75c09e7d3c1604854c30701a620511c4aa568e12 (patch)
tree706cf36e2334b199ff85b105df71b6f0e4e4566c
parent4b6c167260f42134dc465ccd05b68d38a3b275d3 (diff)
downloadgcc-75c09e7d3c1604854c30701a620511c4aa568e12.zip
gcc-75c09e7d3c1604854c30701a620511c4aa568e12.tar.gz
gcc-75c09e7d3c1604854c30701a620511c4aa568e12.tar.bz2
misc.c (gnat_init, [...]): Now static.
* misc.c (gnat_init, gnat_init_options, gnat_decode_option): Now static. (LANG_HOOKS_GET_ALIAS_SET): New macro. (gnat_expand_expr, case NULL_EXPR): Always call set_mem_attributes. (gnat_get_alias_set): Renamed from lang_get_alias_set. * gigi.h (gnat_decode_option, gnat_init_option, gnat_init): Delete declarations. (gnat_get_alias_set): Likewise. From-SVN: r46449
-rw-r--r--gcc/ada/ChangeLog11
-rw-r--r--gcc/ada/gigi.h17
-rw-r--r--gcc/ada/misc.c22
3 files changed, 29 insertions, 21 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 32325c2..0d7dcbd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,14 @@
+Tue Oct 23 19:00:51 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * misc.c (gnat_init, gnat_init_options, gnat_decode_option):
+ Now static.
+ (LANG_HOOKS_GET_ALIAS_SET): New macro.
+ (gnat_expand_expr, case NULL_EXPR): Always call set_mem_attributes.
+ (gnat_get_alias_set): Renamed from lang_get_alias_set.
+ * gigi.h (gnat_decode_option, gnat_init_option, gnat_init):
+ Delete declarations.
+ (gnat_get_alias_set): Likewise.
+
2001-10-22 Geert Bosh <bosch@gnat.com>
* Make-lang.in (gnattools, cross-gnattools): Remove gnatmem.
diff --git a/gcc/ada/gigi.h b/gcc/ada/gigi.h
index 49d8533..8284853 100644
--- a/gcc/ada/gigi.h
+++ b/gcc/ada/gigi.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
@@ -34,18 +34,6 @@
/* Declare all functions and types used by gigi. */
-/* Decode all the language specific options that cannot be decoded by GCC. The
- option decoding phase of GCC calls this routine on the flags that it cannot
- decode. This routine returns 1 if it is successful, otherwise it
- returns 0. */
-extern int gnat_decode_option PARAMS ((int, char **));
-
-/* Perform all initialization steps for option processing. */
-extern void gnat_init_options PARAMS ((void));
-
-/* Perform all the initialization steps that are language-specific. */
-extern void gnat_init PARAMS ((void));
-
/* See if DECL has an RTL that is indirect via a pseudo-register or a
memory location and replace it with an indirect reference if so.
This improves the debugger's ability to display the value. */
@@ -68,9 +56,6 @@ extern tree make_transform_expr PARAMS ((Node_Id));
here that a __builtin_setjmp was done to BUF. */
extern void update_setjmp_buf PARAMS ((tree));
-/* Get the alias set corresponding to a type or expression. */
-extern HOST_WIDE_INT gnat_get_alias_set PARAMS ((tree));
-
/* GNU_TYPE is a type. Determine if it should be passed by reference by
default. */
extern int default_pass_by_ref PARAMS ((tree));
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c
index df99c0a..298bfc3 100644
--- a/gcc/ada/misc.c
+++ b/gcc/ada/misc.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
* *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* *
@@ -108,6 +108,11 @@ const char *gnat_tree_code_name[] = {
};
#undef DEFTREECODE
+static void gnat_init PARAMS ((void));
+static void gnat_init_options PARAMS ((void));
+static int gnat_decode_option PARAMS ((int, char **));
+static HOST_WIDE_INT gnat_get_alias_set PARAMS ((tree));
+
/* Structure giving our language-specific hooks. */
#undef LANG_HOOKS_INIT
@@ -116,6 +121,10 @@ const char *gnat_tree_code_name[] = {
#define LANG_HOOKS_INIT_OPTIONS gnat_init_options
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION gnat_decode_option
+#undef LANG_HOOKS_HONOR_READONLY
+#define LANG_HOOKS_HONOR_READONLY 1
+#undef LANG_HOOKS_GET_ALIAS_SET
+#define LANG_HOOKS_GET_ALIAS_SET gnat_get_alias_set
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
@@ -641,9 +650,12 @@ gnat_expand_expr (exp, target, tmode, modifier)
/* We aren't going to be doing anything with this memory, but allocate
it anyway. If it's variable size, make a bogus address. */
if (! host_integerp (TYPE_SIZE_UNIT (type), 1))
- return gen_rtx_MEM (BLKmode, virtual_stack_vars_rtx);
+ result = gen_rtx_MEM (BLKmode, virtual_stack_vars_rtx);
else
- return assign_temp (type, 0, TREE_ADDRESSABLE (exp), 1);
+ result = assign_temp (type, 0, TREE_ADDRESSABLE (exp), 1);
+
+ set_mem_attributes (result, exp, 1);
+ return result;
case ALLOCATE_EXPR:
return
@@ -935,8 +947,8 @@ get_type_alignment (gnat_type)
/* Get the alias set corresponding to a type or expression. */
-HOST_WIDE_INT
-lang_get_alias_set (type)
+static HOST_WIDE_INT
+gnat_get_alias_set (type)
tree type;
{
/* If this is a padding type, use the type of the first field. */