From 5ec323b5228c83b15fdae81029eddab1b745703b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 18 Sep 2009 08:17:29 +0200 Subject: PR10417 Fix declare_noncontig_union struct emitting. * loc2c.c (declare_noncontig_union): Only open struct when loc_noncontiguous. --- loc2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loc2c.c') diff --git a/loc2c.c b/loc2c.c index c27242fa..5d6b5494 100644 --- a/loc2c.c +++ b/loc2c.c @@ -1407,12 +1407,12 @@ declare_noncontig_union (struct obstack *pool, int indent, obstack_printf (pool, "%*schar bytes[%" PRIu64 "];\n", indent * 2, "", loc->byte_size); - obstack_printf (pool, "%*sstruct {\n", indent++ * 2, ""); - if (loc->type == loc_noncontiguous) { Dwarf_Word offset = 0; struct location *p; + obstack_printf (pool, "%*sstruct {\n", indent++ * 2, ""); + for (p = loc->pieces; p != NULL; p = p->next) { obstack_printf (pool, "%*suint%" PRIu64 "_t p%" PRIu64 ";\n", -- cgit