Commit 3f4907a6 by Jason Merrill Committed by Jason Merrill

dwarf2out.c (new_die): Use xcalloc.

        * dwarf2out.c (new_die): Use xcalloc.
        (output_die): Abort rather than emit a local reference to offset 0.

From-SVN: r39201
parent 9b8fd32c
2001-01-23 Jason Merrill <jason@redhat.com>
* dwarf2out.c (new_die): Use xcalloc.
(output_die): Abort rather than emit a local reference to offset 0.
2001-01-17 Andrew Haley <aph@redhat.com>
* libgcc2.c (get_reg_addr): Don't abort if we haven't got a copy
......
......@@ -4817,16 +4817,9 @@ new_die (tag_value, parent_die)
register enum dwarf_tag tag_value;
register dw_die_ref parent_die;
{
register dw_die_ref die = (dw_die_ref) xmalloc (sizeof (die_node));
register dw_die_ref die = (dw_die_ref) xcalloc (1, sizeof (die_node));
die->die_tag = tag_value;
die->die_abbrev = 0;
die->die_offset = 0;
die->die_child = NULL;
die->die_parent = NULL;
die->die_sib = NULL;
die->die_attr = NULL;
die->die_symbol = NULL;
if (parent_die != NULL)
add_child_die (parent_die, die);
......@@ -6060,6 +6053,8 @@ output_die (die)
case dw_val_class_die_ref:
if (AT_ref_external (a))
output_symbolic_ref (AT_ref (a));
else if (AT_ref (a)->die_offset == 0)
abort ();
else
ASM_OUTPUT_DWARF_DATA (asm_out_file, AT_ref (a)->die_offset);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment