diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2007-09-10 08:52:53 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-09-10 08:52:53 +0000 |
commit | c03550f61c494dd20c46578aa4bc9a525323782c (patch) | |
tree | 1f23cc0f089fc893a38fd2917c4bf221fe759c44 /gcc/ada/decl.c | |
parent | 9e8c06778a96e17e1cc207a222e36e7b072da9e8 (diff) | |
download | gcc-c03550f61c494dd20c46578aa4bc9a525323782c.zip gcc-c03550f61c494dd20c46578aa4bc9a525323782c.tar.gz gcc-c03550f61c494dd20c46578aa4bc9a525323782c.tar.bz2 |
decl.c (gnat_to_gnu_entity): Deal with variable built for a debug renaming declaration specially.
* decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
a debug renaming declaration specially.
From-SVN: r128327
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 202cca8..5aa4bc8 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -523,6 +523,21 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* Get the type after elaborating the renamed object. */ gnu_type = gnat_to_gnu_type (Etype (gnat_entity)); + /* For a debug renaming declaration, build a pure debug entity. */ + if (Present (Debug_Renaming_Link (gnat_entity))) + { + rtx addr; + gnu_decl = build_decl (VAR_DECL, gnu_entity_id, gnu_type); + /* The (MEM (CONST (0))) pattern is prescribed by STABS. */ + if (global_bindings_p ()) + addr = gen_rtx_CONST (VOIDmode, const0_rtx); + else + addr = stack_pointer_rtx; + SET_DECL_RTL (gnu_decl, gen_rtx_MEM (Pmode, addr)); + gnat_pushdecl (gnu_decl, gnat_entity); + break; + } + /* If this is a loop variable, its type should be the base type. This is because the code for processing a loop determines whether a normal loop end test can be done by comparing the bounds of the |