On Mon, May 28, 2018 at 08:50:46AM +0200, Mark Wielaard wrote:
> gcc/
> 
>       * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around
>       lab2 if it is an expression containing a minus sign.

Ok, thanks.

> diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
> index 93577d1..62a1da9 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 an 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)
>      {

        Jakub

Reply via email to