public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7892] Minor tweak
@ 2023-09-27  8:27 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2023-09-27  8:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7b46f3150fc841e050f03e8435de68c01437d1cc

commit r13-7892-g7b46f3150fc841e050f03e8435de68c01437d1cc
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Wed Sep 27 10:00:03 2023 +0200

    Minor tweak
    
    gcc/ada/
            * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Tweak.

Diff:
---
 gcc/ada/gcc-interface/decl.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 20f43de9ea9..37b949865a6 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)))
 	      ;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-27  8:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27  8:27 [gcc r13-7892] Minor tweak Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).