decl.c (gnat_to_gnu_entity): When they are global...
authorPierre-Marie de Rodat <derodat@adacore.com>
Wed, 7 Dec 2016 12:04:01 +0000 (12:04 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 7 Dec 2016 12:04:01 +0000 (12:04 +0000)
* 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
gcc/ada/gcc-interface/decl.c

index 2380adcaccac0cfb1607caabe53caef2f0ef8239..0acae5761a0f03b0814fdbb4f35a9d5d02648712 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-07  Pierre-Marie de Rodat  <derodat@adacore.com>
+
+       * 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  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Translate
index a6e8367d842ff2a67395ac51b31c9b47cb1ddeb0..18ec63d5e64b509e1d5baef6cae234887c518c52 100644 (file)
@@ -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;
          }