]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (add_gnat_descriptive_type_attribute): Temporarily suppress debug info...
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 25 Oct 2011 22:14:26 +0000 (22:14 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 25 Oct 2011 22:14:26 +0000 (22:14 +0000)
* dwarf2out.c (add_gnat_descriptive_type_attribute): Temporarily
suppress debug info for the parent type.

From-SVN: r180456

gcc/ChangeLog
gcc/dwarf2out.c

index 7789e6cfa0a064a2010b3f9efd3a8388551b3867..e6c69f2b65683027068fc69386093f8aeb97311e 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * dwarf2out.c (add_gnat_descriptive_type_attribute): Temporarily
+       suppress debug info for the parent type.
+
 2011-10-25  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/ia64/ia64.c (ia64_profile_hook): Fix thinko.
index e328201a82aa120fb5d1f68ea04e4787cf29e890..8d5a9f0fc813fe6cc2b9e218059718fa4c557e3f 100644 (file)
@@ -15415,7 +15415,11 @@ add_gnat_descriptive_type_attribute (dw_die_ref die, tree type,
   dtype_die = lookup_type_die (dtype);
   if (!dtype_die)
     {
+      /* The descriptive type indirectly references TYPE if this is also the
+        case for TYPE itself.  Do not deal with the circularity here.  */
+      TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type)) = 1;
       gen_type_die (dtype, context_die);
+      TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type)) = 0;
       dtype_die = lookup_type_die (dtype);
       gcc_assert (dtype_die);
     }