public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/104549] Missing variable at O2/O3 likely caused by -fearly-inlining Date: Wed, 16 Feb 2022 13:01:11 +0000 [thread overview] Message-ID: <bug-104549-4-kNU6Ug8E40@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104549-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104549 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The assembly of main is: main: .LFB1: # pr104549.c:9:1 .loc 1 9 1 .cfi_startproc # BLOCK 2, count:1073741824 (estimated locally) seq:0 # PRED: ENTRY [always] count:1073741824 (estimated locally) (FALLTHRU) # pr104549.c:10:5 .loc 1 10 5 .LBB4: .LBB5: # pr104549.c:3:5 .loc 1 3 5 .LVL2: # DEBUG i => 0 # pr104549.c:4:5 .loc 1 4 5 # pr104549.c:4:19 .loc 1 4 19 # pr104549.c:4:12 .loc 1 4 12 # pr104549.c:5:5 .loc 1 5 5 .LBE5: .LBE4: # pr104549.c:9:1 .loc 1 9 1 is_stmt 0 subq $8, %rsp .cfi_def_cfa_offset 16 .LBB7: .LBB6: # pr104549.c:5:5 .loc 1 5 5 xorl %edi, %edi xorl %eax, %eax call test .LVL3: .LBE6: .LBE7: # pr104549.c:11:1 .loc 1 11 1 xorl %eax, %eax addq $8, %rsp .cfi_def_cfa_offset 8 # SUCC: EXIT [always] count:1073741824 (estimated locally) ret with -O2 -g -dA, the inlined a is in the .LBB4...LBE4 and .LBB7...LBE7 ranges but the first range is empty (no insns in it), the very first insn in main doesn't belong to the inline function and .loc for it is line 9, perhaps the debugger chooses some other one because of the is_stmt 0? With -gno-statement-frontiers the debugger reports main's { as the first location.
next prev parent reply other threads:[~2022-02-16 13:01 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-15 15:46 [Bug debug/104549] New: " assaiante at diag dot uniroma1.it 2022-02-15 17:30 ` [Bug debug/104549] " jakub at gcc dot gnu.org 2022-02-16 13:01 ` jakub at gcc dot gnu.org [this message] 2022-02-17 12:38 ` assaiante at diag dot uniroma1.it 2022-02-17 13:48 ` assaiante at diag dot uniroma1.it
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104549-4-kNU6Ug8E40@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).