summaryrefslogtreecommitdiffstats
path: root/loc2c-test.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-07-07 20:19:40 +0200
committerMark Wielaard <mjw@redhat.com>2009-07-07 20:19:40 +0200
commit5cc5056844a402c6cf466c8ca45119a4540b5900 (patch)
treea2dc259580a48e577ffc7bc764ccf02f8978be0c /loc2c-test.c
parent83eaf9b5f3d1f1287b7962efc6bc703357b984ba (diff)
downloadsystemtap-steved-5cc5056844a402c6cf466c8ca45119a4540b5900.tar.gz
systemtap-steved-5cc5056844a402c6cf466c8ca45119a4540b5900.tar.xz
systemtap-steved-5cc5056844a402c6cf466c8ca45119a4540b5900.zip
PR10348 Compilation failure with gcc 4.5 snapshot: switch jumps over vars.
* loc2c-test.c (print_vars): Define attr_mem, typedie_mem and typedie before switch. * loc2c.c (translate): Wrap case DW_OP_drop in block brackets. (location_relative): Initialize stack.
Diffstat (limited to 'loc2c-test.c')
-rw-r--r--loc2c-test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/loc2c-test.c b/loc2c-test.c
index 01edc805..01108573 100644
--- a/loc2c-test.c
+++ b/loc2c-test.c
@@ -378,6 +378,9 @@ static void
print_vars (unsigned int indent, Dwarf_Die *die)
{
Dwarf_Die child;
+ Dwarf_Attribute attr_mem;
+ Dwarf_Die typedie_mem;
+ Dwarf_Die *typedie;
if (dwarf_child (die, &child) == 0)
do
switch (dwarf_tag (&child))
@@ -387,9 +390,7 @@ print_vars (unsigned int indent, Dwarf_Die *die)
printf ("%*s%-30s[%6" PRIx64 "]", indent, "",
dwarf_diename (&child),
(uint64_t) dwarf_dieoffset (&child));
- Dwarf_Attribute attr_mem;
- Dwarf_Die typedie_mem;
- Dwarf_Die *typedie = dwarf_formref_die
+ typedie = dwarf_formref_die
(dwarf_attr_integrate (&child, DW_AT_type, &attr_mem),
&typedie_mem);
print_type (typedie, '\t');