diff options
Diffstat (limited to 'gcc/dwarf2asm.c')
-rw-r--r-- | gcc/dwarf2asm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index 93577d1..c6f11c7 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -811,7 +811,17 @@ dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED, fputs ("\t.uleb128 ", asm_out_file); assemble_name (asm_out_file, lab1); putc ('-', asm_out_file); - assemble_name (asm_out_file, lab2); + /* dwarf2out.c might give us a label expression (e.g. .LVL548-1) + as second argument. If so, make it a subexpression, to make + sure the substraction is done in the right order. */ + if (strchr (lab2, '-') != NULL) + { + putc ('(', asm_out_file); + assemble_name (asm_out_file, lab2); + putc (')', asm_out_file); + } + else + assemble_name (asm_out_file, lab2); if (flag_debug_asm && comment) { |