summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-04 22:25:29 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-04 22:25:29 +0000
commite6baa273e0c6cb72f5959c98a1c43f4b0a5abc52 (patch)
tree4e7ba983f2657a7350b42124b089f9445057d347
parentdb13dee0d21c39900b350e2ac8deea3d3d40d876 (diff)
downloadgcc-e6baa273e0c6cb72f5959c98a1c43f4b0a5abc52.tar.gz
* gengtype.c (write_gc_root): Don't unnecessarily prevent
global variable-length arrays being roots. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54266 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/gengtype.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 270e8dfafc9..7ca378be2e0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2002-06-04 Geoffrey Keating <geoffk@redhat.com>
+ * gengtype.c (write_gc_root): Don't unnecessarily prevent
+ global variable-length arrays being roots.
+
* config.gcc (powerpc-*-darwin*): Set config_gtfiles.
* configure.in (config_gtfiles): New variable.
(all_gtfiles): Initialise from config_gtfiles.
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index dda57e2d239..82d9a1166b1 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1546,7 +1546,7 @@ write_gc_root (f, v, type, name, has_length, line, if_marked)
tp->u.param_struct.stru->u.s.tag);
}
else if (has_length
- && tp->kind == TYPE_POINTER)
+ && (tp->kind == TYPE_POINTER || UNION_OR_STRUCT_P (tp)))
{
fprintf (f, " &gt_ggc_ma_%s", name);
}