This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fixes testsuite failure writing debug info on field with incomplete type.


On target architecture I'm working on, gcc.dg/noncompile/incomplete-1.c
is failing with -O3 -g because of incomplete type of structure's field.
This patch takes care of it by adding extra check.

======= ChangeLog entry =======

2002-12-9  Igor Shevlyakov <igor@microunity.com>

	* dwarf2out.c (field_byte_offset): Check if type of decl is
complete.

======= patch ===============

Index: dwarf2out.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.390
diff -c -3 -p -r1.390 dwarf2out.c
*** dwarf2out.c 26 Nov 2002 12:34:23 -0000      1.390
--- dwarf2out.c 9 Dec 2002 23:26:45 -0000
*************** field_byte_offset (decl)
*** 8828,8833 ****
--- 8828,8835 ----
  
    if (TREE_CODE (decl) == ERROR_MARK)
      return 0;
+   if (TREE_CODE (TREE_TYPE(decl)) == ERROR_MARK)
+     return 0;
    else if (TREE_CODE (decl) != FIELD_DECL)
      abort ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]