godump.c (go_format_type): Correct length of name added to obstack for anonymous...
authorIan Lance Taylor <iant@google.com>
Tue, 31 May 2011 05:34:45 +0000 (05:34 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 31 May 2011 05:34:45 +0000 (05:34 +0000)
* godump.c (go_format_type): Correct length of name added to
obstack for anonymous field.

From-SVN: r174465

gcc/ChangeLog
gcc/godump.c

index 0e9738198f34600cbc1ffb529e0f3634a571e4f3..c2fa9bbb5db1359ce84256bf9c9948a9e984faf3 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-30  Ian Lance Taylor  <iant@google.com>
+
+       * godump.c (go_format_type): Correct length of name added to
+       obstack for anonymous field.
+
 2011-05-30  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        PR target/49186
index e0d50b5d1b0624fd1e627dc36615aa24c055b905..3f78eead279446ab84e84d50430337a1a92b5c20 100644 (file)
@@ -700,7 +700,7 @@ go_format_type (struct godump_container *container, tree type,
              {
                char buf[100];
 
-               obstack_grow (ob, "Godump_", 2);
+               obstack_grow (ob, "Godump_", 7);
                snprintf (buf, sizeof buf, "%d", i);
                obstack_grow (ob, buf, strlen (buf));
                i++;