> > /* Terminate the table. */ > > - dw2_asm_output_data (1, 0, NULL); > > + if (abbrev_die_table_in_use > 1) > > + dw2_asm_output_data (1, 0, NULL); > > I'd prefer this to be handled by > > if (abbrev_die_table_in_use == 0) > return; > > at the beginning of the function. > > Ok with that change.
I assume you meant the following, since abbrev_die_table_in_use is initialized to one in dwarf2out_init (). Zero-th entry is not written to the table (as can be seen from the diff context now). --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11056,6 +11056,9 @@ output_abbrev_section (void) { unsigned long abbrev_id; + if (abbrev_die_table_in_use == 1) + return; + for (abbrev_id = 1; abbrev_id < abbrev_die_table_in_use; ++abbrev_id) { dw_die_ref abbrev = abbrev_die_table[abbrev_id]; Still OK? Thanks, Mark