On Thu, Oct 21, 2021 at 5:07 PM Martin Sebor via Gcc <gcc@gcc.gnu.org> wrote:
>
> I put #pragma GCC optimize "0" at the top of gimplify.c to help
> me debug something in a bootstrapped compiler.  The file failed
> to compile with many assembler errors like this:
>
> /tmp/ccL9zcXD.s: Assembler messages:
> /tmp/ccL9zcXD.s:9: Error: CFI instruction used without previous
> .cfi_startproc
>
> I've done this before and had no problems.  Is this supposed to
> work or was I just lucky when it did before?

I see that dwarf2out_do_cfi_asm is sticky, once true or false, it will
always return true or false.
So it might be an issue there.

Thanks,
Andrew Pinski


>
> Thanks
> Martin
>
> PS The top of gimplify.s is below (this is with no other code
> changes to any files except the #pragma).
>
>         .file   "gimplify.c"
>         .text
>         .local  _ZZ20gimplify_va_arg_exprPP9tree_nodePP6gimpleS4_E9gave_help
>         .comm   
> _ZZ20gimplify_va_arg_exprPP9tree_nodePP6gimpleS4_E9gave_help,1,1
>         .p2align 4
>         .type   _ZL19handled_component_pPK9tree_node, @function
> _ZL19handled_component_pPK9tree_node:
>         pushq   %rbp
>         .cfi_def_cfa_offset 16
>         .cfi_offset 6, -16
>         movq    %rsp, %rbp
>         .cfi_def_cfa_register 6
>         movq    %rdi, -8(%rbp)
>         movq    -8(%rbp), %rax
>         movzwl  (%rax), %eax
>         movzwl  %ax, %eax
>         subl    $47, %eax
>         cmpl    $6, %eax
>         ja      .L2
>         movl    $1, %eax
>         jmp     .L3
> .L2:
>         movl    $0, %eax
> .L3:
>         popq    %rbp
>         .cfi_def_cfa 7, 8
>         ret

Reply via email to