[gcc r12-2989] Fix thinko in latest change for GNAT encodings

Eric Botcazou ebotcazou@gcc.gnu.org
Wed Aug 18 12:22:47 GMT 2021


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));
 	    }
 	}


More information about the Gcc-cvs mailing list