trans.c (lvalue_required_p): Adjust GNU_TYPE in the recursive call.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 30 Aug 2019 14:48:16 +0000 (14:48 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 30 Aug 2019 14:48:16 +0000 (14:48 +0000)
* gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
in the recursive call.
<N_Selected_Component>: Likewise.

From-SVN: r275191

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index 463a47a6619b5a58972b3aad85353296635e0e1a..71681b692584e3ce3e5efd556411470fb6c9a4fa 100644 (file)
@@ -1,3 +1,9 @@
+2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
+       in the recursive call.
+       <N_Selected_Component>: Likewise.
+
 2019-08-30  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/utils.c (build_template): Deal with parameters
index bd861f350c1df80a1d5c3177f65b0cd6d39ced7f..5579986c0c3669e9b7a2c40bceb6f05f6102cabf 100644 (file)
@@ -873,12 +873,14 @@ lvalue_required_p (Node_Id gnat_node, tree gnu_type, bool constant,
       if (Prefix (gnat_parent) != gnat_node)
        return 0;
 
-      return lvalue_required_p (gnat_parent, gnu_type, constant,
-                               address_of_constant);
+      return lvalue_required_p (gnat_parent,
+                               get_unpadded_type (Etype (gnat_parent)),
+                               constant, address_of_constant);
 
     case N_Selected_Component:
-      return lvalue_required_p (gnat_parent, gnu_type, constant,
-                               address_of_constant);
+      return lvalue_required_p (gnat_parent,
+                               get_unpadded_type (Etype (gnat_parent)),
+                               constant, address_of_constant);
 
     case N_Object_Renaming_Declaration:
       /* We need to preserve addresses through a renaming.  */