Commit 0d5a0a33 by Pierre-Marie de Rodat Committed by Eric Botcazou

utils.c (can_materialize_object_renaming_p): Synchronize with GNAT's…

utils.c (can_materialize_object_renaming_p): Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration...

	* gcc-interface/utils.c (can_materialize_object_renaming_p):
	Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
	process Original_Node instead of expanded names.

From-SVN: r248054
parent 13b6b773
2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/utils.c (can_materialize_object_renaming_p):
Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
process Original_Node instead of expanded names.
2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
......
......@@ -5431,11 +5431,16 @@ can_materialize_object_renaming_p (Node_Id expr)
{
while (true)
{
expr = Original_Node (expr);
switch Nkind (expr)
{
case N_Identifier:
case N_Expanded_Name:
return true;
if (!Present (Renamed_Object (Entity (expr))))
return true;
expr = Renamed_Object (Entity (expr));
break;
case N_Selected_Component:
{
......
2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
* gnat.dg/specs/pack13.ads: New test.
2017-05-14 Martin Sebor <msebor@redhat.com>
PR middle-end/77671
......
-- { dg-do compile }
package Pack13 is
generic
type Value_Type is private;
Value : in out Value_Type;
package G is end G;
type Rec is record
B : Boolean;
end record;
for Rec use record
B at 0 range 8 .. 8;
end record;
for Rec'size use 9;
type Arr is array (Boolean) of Rec;
pragma Pack (Arr);
A : Arr;
package My_G is new G (Boolean, A(True).B);
end Pack13;
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