From 7f6dd1021e66c83a6f5e660d64fb055540bd6530 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 30 Aug 2019 14:48:16 +0000 Subject: [PATCH] trans.c (lvalue_required_p): Adjust GNU_TYPE in the recursive call. * gcc-interface/trans.c (lvalue_required_p) : Adjust GNU_TYPE in the recursive call. : Likewise. From-SVN: r275191 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/trans.c | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 463a47a6619..71681b69258 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-08-30 Eric Botcazou + + * gcc-interface/trans.c (lvalue_required_p) : Adjust GNU_TYPE + in the recursive call. + : Likewise. + 2019-08-30 Eric Botcazou * gcc-interface/utils.c (build_template): Deal with parameters diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index bd861f350c1..5579986c0c3 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -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. */ -- 2.30.2