From c2d7fe594673b58bcf1424ee3b0cfd8a180ba3b3 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 10 Oct 2001 21:48:38 +0000 Subject: decl.c: (gnat_to_gnu_entity... * decl.c: (gnat_to_gnu_entity, case object): Also materialize VAR_DECL for constant if not Is_Public but -O0. From-SVN: r46160 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/decl.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 76bb2c8..194dde5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2001-10-10 Richard Kenner + + * decl.c: (gnat_to_gnu_entity, case object): Also materialize + VAR_DECL for constant if not Is_Public but -O0. + 2001-10-10 Richard Kenner * misc.c (struct lang_hooks): Add new initializer to match GCC change. diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index c2acdbc..34a01cd 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)))) -- cgit v1.1