* stabsread.c (cleanup_undefined_types_noname): Manually set the
authorJoel Brobecker <brobecker@gnat.com>
Tue, 8 Apr 2008 22:09:20 +0000 (22:09 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 8 Apr 2008 22:09:20 +0000 (22:09 +0000)
        instance flags of the undefined type before calling replace_type.

gdb/ChangeLog
gdb/stabsread.c

index 6718f6d..6058b95 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-08  Joel Brobecker  <brobecker@adacore.com>
+
+       * stabsread.c (cleanup_undefined_types_noname): Manually set the
+       instance flags of the undefined type before calling replace_type.
+
 2008-04-08  Vladimir Prus  <vladimir@codesourcery.com>
 
        * target.h (enum strata): Remove the download_stratum.
index 8e88ea2..3b747b4 100644 (file)
@@ -4266,7 +4266,14 @@ cleanup_undefined_types_noname (void)
 
       type = dbx_lookup_type (nat.typenums);
       if (nat.type != *type && TYPE_CODE (*type) != TYPE_CODE_UNDEF)
-        replace_type (nat.type, *type);
+        {
+          /* The instance flags of the undefined type are still unset,
+             and needs to be copied over from the reference type.
+             Since replace_type expects them to be identical, we need
+             to set these flags manually before hand.  */
+          TYPE_INSTANCE_FLAGS (nat.type) = TYPE_INSTANCE_FLAGS (*type);
+          replace_type (nat.type, *type);
+        }
     }
 
   noname_undefs_length = 0;