From bbe9a71dff7c5684dbdca1c1befc93099b411636 Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Wed, 7 Dec 2016 12:04:01 +0000 Subject: [PATCH] decl.c (gnat_to_gnu_entity): When they are global... * gcc-interface/decl.c (gnat_to_gnu_entity): When they are global, consider ___XR GNAT encodings variables for renamings as static so they have a location in the debug info. From-SVN: r243341 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/decl.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2380adcacca..0acae5761a0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2016-12-07 Pierre-Marie de Rodat + + * gcc-interface/decl.c (gnat_to_gnu_entity): When they are global, + consider ___XR GNAT encodings variables for renamings as static so + they have a location in the debug info. + 2016-12-07 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Translate diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index a6e8367d842..18ec63d5e64 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -672,6 +672,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) VAR_DECL, gnu_entity_name, gnu_type); SET_DECL_VALUE_EXPR (gnu_decl, value); DECL_HAS_VALUE_EXPR_P (gnu_decl) = 1; + TREE_STATIC (gnu_decl) = global_bindings_p (); gnat_pushdecl (gnu_decl, gnat_entity); break; } -- 2.30.2