utils.c (create_type_decl): Do not pass declarations of dummy fat pointer types to...
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 21 Apr 2009 07:00:44 +0000 (07:00 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 21 Apr 2009 07:00:44 +0000 (07:00 +0000)
* gcc-interface/utils.c (create_type_decl): Do not pass declarations
of dummy fat pointer types to the debug back-end.

From-SVN: r146467

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

index d94432f80b1e03d0327a373d2e16a148623582fa..0e48f7848b1b26fcda921f21434804db06adedfc 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-21  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/utils.c (create_type_decl): Do not pass declarations
+       of dummy fat pointer types to the debug back-end.
+
 2009-04-20  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity): Rewrite Esize calculation.
index 55e474c98298a8c1181bb9d2d9329b6ab9a84476..8802827cf09be5209424461fa05c677324ebfc5b 100644 (file)
@@ -1244,15 +1244,19 @@ create_type_decl (tree type_name, tree type, struct attrib *attr_list,
     TYPE_STUB_DECL (type) = type_decl;
 
   /* Pass the type declaration to the debug back-end unless this is an
-     UNCONSTRAINED_ARRAY_TYPE that the back-end does not support, an
-     ENUMERAL_TYPE or RECORD_TYPE which are handled separately, or a
-     type for which debugging information was not requested.  */
+     UNCONSTRAINED_ARRAY_TYPE that the back-end does not support, or a
+     type for which debugging information was not requested, or else an
+     ENUMERAL_TYPE or RECORD_TYPE (except for fat pointers) which are
+     handled separately.  And do not pass dummy types either.  */
   if (code == UNCONSTRAINED_ARRAY_TYPE || !debug_info_p)
     DECL_IGNORED_P (type_decl) = 1;
   else if (code != ENUMERAL_TYPE
           && (code != RECORD_TYPE || TYPE_IS_FAT_POINTER_P (type))
           && !((code == POINTER_TYPE || code == REFERENCE_TYPE)
-               && TYPE_IS_DUMMY_P (TREE_TYPE (type))))
+               && TYPE_IS_DUMMY_P (TREE_TYPE (type)))
+          && !(code == RECORD_TYPE
+               && TYPE_IS_DUMMY_P
+                  (TREE_TYPE (TREE_TYPE (TYPE_FIELDS (type))))))
     rest_of_type_decl_compilation (type_decl);
 
   return type_decl;