* 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
+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
{
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
--- /dev/null
+-- { 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;