summaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-10 21:48:38 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-10 21:48:38 +0000
commit12f95b8ab114eec3a438fcb21e916897162c2410 (patch)
treec7f7c2bcb76c9f454d8ad2d41ce302c26f0419d3 /gcc/ada/decl.c
parent016b1b400bb00cf54aa3bcf3d5f6642fec92e2cc (diff)
downloadgcc-12f95b8ab114eec3a438fcb21e916897162c2410.tar.gz
* decl.c: (gnat_to_gnu_entity, case object): Also materialize
VAR_DECL for constant if not Is_Public but -O0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46160 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index c2acdbcfc25..34a01cd275f 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision: 1.3 $
+ * $Revision$
* *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* *
@@ -1033,11 +1033,13 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
STACK_CHECK_MAX_VAR_SIZE))))
update_setjmp_buf (TREE_VALUE (gnu_block_stack));
- /* If this is a public constant and we're not making a VAR_DECL for
- it, make one just for export or debugger use. Likewise if
- the address is taken or if the object or type is aliased. */
+ /* If this is a public constant or we're not optimizing and we're not
+ making a VAR_DECL for it, make one just for export or debugger
+ use. Likewise if the address is taken or if the object or type is
+ aliased. */
if (definition && TREE_CODE (gnu_decl) == CONST_DECL
&& (Is_Public (gnat_entity)
+ || optimize == 0
|| Address_Taken (gnat_entity)
|| Is_Aliased (gnat_entity)
|| Is_Aliased (Etype (gnat_entity))))