Fix thinko in latest change for GNAT encodings
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 18 Aug 2021 12:22:07 +0000 (14:22 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 18 Aug 2021 12:23:09 +0000 (14:23 +0200)
 gcc/ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Fix
thinko in latest change.

gcc/ada/gcc-interface/decl.c

index 4b6479b..5cedb74 100644 (file)
@@ -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));
            }
        }