aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 0172789..34183ba 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -5061,9 +5061,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
}
/* If we really have a ..._DECL node, set a couple of flags on it. But we
- cannot do so if we are reusing the ..._DECL node made for an alias or a
- renamed object as the predicates don't apply to it but to GNAT_ENTITY. */
+ cannot do so if we are reusing the ..._DECL node made for an equivalent
+ type or an alias or a renamed object as the predicates don't apply to it
+ but to GNAT_ENTITY. */
if (DECL_P (gnu_decl)
+ && !(is_type && gnat_equiv_type != gnat_entity)
&& !Present (Alias (gnat_entity))
&& !(Present (Renamed_Object (gnat_entity)) && saved))
{