]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (gnat_to_gnu_entity): Do not set flags on the DECL node built for a type which...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 7 Mar 2012 20:13:41 +0000 (20:13 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 7 Mar 2012 20:13:41 +0000 (20:13 +0000)
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
DECL node built for a type which has a non-trivial equivalent type.

From-SVN: r185076

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index 636d6cc4e340502ef50bf94a7f17dce271a18523..74b72c8a0ec1aba46763dfb401119b212d86ec1b 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set flags on the
+       DECL node built for a type which has a non-trivial equivalent type.
+
 2012-03-07  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/gigi.h (rest_of_type_decl_compilation): Delete.
index 017278911a33a097542ef8505533745dcacfbdd9..34183bac2ff0442b0453690dd03004dd47dcbb4b 100644 (file)
@@ -5061,9 +5061,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
     }
 
   /* If we really have a ..._DECL node, set a couple of flags on it.  But we
-     cannot do so if we are reusing the ..._DECL node made for an alias or a
-     renamed object as the predicates don't apply to it but to GNAT_ENTITY.  */
+     cannot do so if we are reusing the ..._DECL node made for an equivalent
+     type or an alias or a renamed object as the predicates don't apply to it
+     but to GNAT_ENTITY.  */
   if (DECL_P (gnu_decl)
+      && !(is_type && gnat_equiv_type != gnat_entity)
       && !Present (Alias (gnat_entity))
       && !(Present (Renamed_Object (gnat_entity)) && saved))
     {