https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104549
--- Comment #3 from Cristian Assaiante <assaiante at diag dot uniroma1.it> --- I have tested multiple older gcc versions (4.3, 7.5, 9.4, 11.2) and apparently the variable is visible in 4.3 and 7.5. The asm for the main function of the binary from gcc7.5: main: .LFB1: # a.c:9 .loc 1 9 0 .cfi_startproc # BLOCK 2 freq:10000 seq:0 # PRED: ENTRY [100.0%] (FALLTHRU) .LVL2: subq $8, %rsp .cfi_def_cfa_offset 16 .LBB4: .LBB5: # a.c:5 .loc 1 5 0 xorl %edi, %edi xorl %eax, %eax call test@PLT .LVL3: .LBE5: .LBE4: # a.c:11 .loc 1 11 0 xorl %eax, %eax addq $8, %rsp .cfi_def_cfa_offset 8 # SUCC: EXIT [100.0%] ret Differently from more recent versions, the inlined a is in the LBB5...LBE5 range only. So there is no empty range associated to it and the debug info in correctly visualized in gdb.