public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2989] Fix thinko in latest change for GNAT encodings
@ 2021-08-18 12:22 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-08-18 12:22 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:88ef1a14bb4ba2bb9e6742bb5ed29d83b30723d0

commit r12-2989-g88ef1a14bb4ba2bb9e6742bb5ed29d83b30723d0
Author: Eric Botcazou <ebotcazou@gcc.gnu.org>
Date:   Wed Aug 18 14:22:07 2021 +0200

    Fix thinko in latest change for GNAT encodings
    
     gcc/ada/
            * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Fix
            thinko in latest change.

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

diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 4b6479b2a04..5cedb740a2e 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1998,10 +1998,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	     so we use an intermediate step for standard DWARF.  */
 	  if (debug_info_p)
 	    {
-	      if (gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
-		add_parallel_type (gnu_type, DECL_PARALLEL_TYPE (t));
-	      else
+	      if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
 		SET_TYPE_DEBUG_TYPE (gnu_type, gnu_field_type);
+	      else if (DECL_PARALLEL_TYPE (t))
+		add_parallel_type (gnu_type, DECL_PARALLEL_TYPE (t));
 	    }
 	}


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

only message in thread, other threads:[~2021-08-18 12:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 12:22 [gcc r12-2989] Fix thinko in latest change for GNAT encodings 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).