[llvm-bugs] [Bug 47831] New: DWARF line number 0 generated for nullptr

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 13 10:56:00 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47831

            Bug ID: 47831
           Summary: DWARF line number 0 generated for nullptr
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: jan.kratochvil at redhat.com
                CC: jdevlieghere at apple.com, keith.walker at arm.com,
                    llvm-bugs at lists.llvm.org,
                    paul_robinson at playstation.sony.com

6121117484ddd7c5a03b40004a8bba58506ce9d0 = 2020-10-13

echo >line0.C 'extern void *p; void *f() { return p?:nullptr; }'|clang++ -c
-Wall -g -emit-llvm -o line0.bc line0.C;llvm-dis line0.bc;llc line0.bc;clang++
-c -o line0.o -Wall line0.s;llvm-dwarfdump -debug-line line0.o;llvm-objdump
-dlCr line0.o

Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x0000000000000000      1      0      1   0             0  is_stmt
0x0000000000000004      1     36      1   0             0  is_stmt prologue_end
0x0000000000000014      0     36      1   0             0 
0x0000000000000016      1     36      1   0             0 

       c: 48 83 f8 00                   cmpq    $0, %rax
      10: 74 02                         je      0x14 <f()+0x14>
      12: eb 04                         jmp     0x18 <f()+0x18>

      14: 31 c0                         xorl    %eax, %eax
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ line==0

      16: eb 00                         jmp     0x18 <f()+0x18>
      18: 5d                            popq    %rbp
      19: c3                            retq

  %0 = load i8*, i8** @p, align 8, !dbg !11
  %tobool = icmp ne i8* %0, null, !dbg !11
  br i1 %tobool, label %cond.true, label %cond.false, !dbg !11
cond.true:                                        ; preds = %entry
  br label %cond.end, !dbg !11
cond.false:                                       ; preds = %entry
  br label %cond.end, !dbg !11
cond.end:                                         ; preds = %cond.false,
%cond.true
  %cond = phi i8* [ %0, %cond.true ], [ null, %cond.false ], !dbg !11
                                        ^^^^ has no !dbg attached

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201013/60662edd/attachment.html>


More information about the llvm-bugs mailing list