Commit c03550f6 by Eric Botcazou Committed by Eric Botcazou

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
parent 9e8c0677
2007-09-10 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
a debug renaming declaration specially.
2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (gnat_to_gnu_entity) <Object>: Simplify the condition under
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment