It can only result in a missed early optimization.
Tested on x86_64-suse-linux, applied on the mainline.
2019-08-30 Eric Botcazou <ebotca...@adacore.com>
* gcc-interface/trans.c (lvalue_required_p) <N_Slice>: Adjust GNU_TYPE
in the recursive call.
<N_Selected_Component>: Likewise.
--
Eric Botcazou
Index: gcc-interface/trans.c
===================================================================
--- gcc-interface/trans.c (revision 275187)
+++ gcc-interface/trans.c (working copy)
@@ -873,12 +873,14 @@ lvalue_required_p (Node_Id gnat_node, tree gnu_typ
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. */