aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-11-23 18:55:50 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-11-23 18:55:50 +0000
commit4405947961fa57ecbd0b3270bda0c3d7db8196d7 (patch)
treec59b1845ae54b4bff9e737ce6ec358e0e146715e /gcc/ada/gcc-interface/utils.c
parentc5b966389e4baac448326c1639d672d7f82577e3 (diff)
downloadgcc-4405947961fa57ecbd0b3270bda0c3d7db8196d7.zip
gcc-4405947961fa57ecbd0b3270bda0c3d7db8196d7.tar.gz
gcc-4405947961fa57ecbd0b3270bda0c3d7db8196d7.tar.bz2
decl.c (gnat_to_gnu_entity): Pass the list of attributes when building the corresponding variable of a constant.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Pass the list of attributes when building the corresponding variable of a constant. * gcc-interface/utils.c (create_var_decl_1): Do not process attributes for constants. From-SVN: r154458
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index c79dd4e..ae2bf74 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1404,10 +1404,12 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init,
!= null_pointer_node)
DECL_IGNORED_P (var_decl) = 1;
- if (asm_name && VAR_OR_FUNCTION_DECL_P (var_decl))
- SET_DECL_ASSEMBLER_NAME (var_decl, asm_name);
-
- process_attributes (var_decl, attr_list);
+ if (TREE_CODE (var_decl) == VAR_DECL)
+ {
+ if (asm_name)
+ SET_DECL_ASSEMBLER_NAME (var_decl, asm_name);
+ process_attributes (var_decl, attr_list);
+ }
/* Add this decl to the current binding level. */
gnat_pushdecl (var_decl, gnat_node);