2014-01-07 Michael Eager <eager@eagercon.com>
authorMichael Eager <eager@eagercon.com>
Tue, 7 Jan 2014 17:15:48 +0000 (09:15 -0800)
committerMichael Eager <eager@eagercon.com>
Tue, 1 Jul 2014 00:40:01 +0000 (17:40 -0700)
   * dwarf2read.c (read_structure_type): Set stub if ICC & length == 0.

gdb/dwarf2read.c

index fc4f7cb14719af3fc8f24346964e62fc2a154e20..2563418344b033d7cabfb377ef6ccd3ebda9af45 100644 (file)
@@ -12982,10 +12982,11 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
       TYPE_LENGTH (type) = 0;
     }
 
-  if (producer_is_icc (cu))
+  if (producer_is_icc (cu) && (TYPE_LENGTH (type) == 0))
     {
       /* ICC does not output the required DW_AT_declaration
         on incomplete types, but gives them a size of zero.  */
+      TYPE_STUB (type) = 1;
     }
   else
     TYPE_STUB_SUPPORTED (type) = 1;