aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-09-27 10:00:03 +0200
committerEric Botcazou <ebotcazou@adacore.com>2023-09-27 10:16:28 +0200
commit7b46f3150fc841e050f03e8435de68c01437d1cc (patch)
treef2edabe4486f2dd5488e23dca3f5f6c3ad0a2e80 /gcc
parent121c8377fca0736d4521331074ebe637cbe425b2 (diff)
downloadgcc-7b46f3150fc841e050f03e8435de68c01437d1cc.zip
gcc-7b46f3150fc841e050f03e8435de68c01437d1cc.tar.gz
gcc-7b46f3150fc841e050f03e8435de68c01437d1cc.tar.bz2
Minor tweak
gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Tweak.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/gcc-interface/decl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 20f43de..37b9498 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -1077,7 +1077,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
/* We need to detect the case where a temporary is created to
hold the return value, since we cannot safely rename it at
top level as it lives only in the elaboration routine. */
- || (TREE_CODE (inner) == VAR_DECL
+ || (VAR_P (inner)
&& DECL_RETURN_VALUE_P (inner))
/* We also need to detect the case where the front-end creates
a dangling 'reference to a function call at top level and
@@ -1093,10 +1093,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
We cannot safely rename the rewritten expression since the
underlying object lives only in the elaboration routine. */
- || (TREE_CODE (inner) == INDIRECT_REF
+ || (INDIRECT_REF_P (inner)
&& (inner
= remove_conversions (TREE_OPERAND (inner, 0), true))
- && TREE_CODE (inner) == VAR_DECL
+ && VAR_P (inner)
&& DECL_RETURN_VALUE_P (inner)))
;