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]

Re: [Bug c++/11049] New: -fdump-class-hierarchy causes treechecking failure


This ought to fix this failure.  It looks as an obvious fix to me.  OK
to commit?


Diego.



        * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
        the operand of a CONSTRUCTOR node.


Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.541
diff -d -u -p -r1.541 class.c
--- class.c     20 May 2003 20:52:33 -0000      1.541
+++ class.c     31 May 2003 20:37:49 -0000
@@ -6671,7 +6671,7 @@ dump_array (FILE * stream, tree decl)
                           TFF_PLAIN_IDENTIFIER));
   fprintf (stream, "\n");

-  for (ix = 0, inits = TREE_OPERAND (DECL_INITIAL (decl), 1);
+  for (ix = 0, inits = CONSTRUCTOR_ELTS (DECL_INITIAL (decl));
        inits; ix++, inits = TREE_CHAIN (inits))
     fprintf (stream, "%-4ld  %s\n", (long)(ix * elt),
             expr_as_string (TREE_VALUE (inits), TFF_PLAIN_IDENTIFIER));



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