[llvm-bugs] [Bug 44845] New: [NVPTX] Invalid .debug_pubnames in generated PTX with default nameTableKind

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 7 18:13:46 PST 2020


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

            Bug ID: 44845
           Summary: [NVPTX] Invalid .debug_pubnames in generated PTX with
                    default nameTableKind
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: PTX
          Assignee: unassignedbugs at nondot.org
          Reporter: timshen91 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 23109
  --> https://bugs.llvm.org/attachment.cgi?id=23109&action=edit
reproducer

The attached is a modified version of the test case cu-range-hole.ll. The
modification is to remove "nameTableKind: None" in the DICompileUnit metadata.
llc takes it and produces invalid PTX.

ptxas error message:

ptxas /tmp/tmpxft_00033edc_00000000-0_stdin, line 274; fatal   : Parsing error
near '-': syntax error
ptxas fatal   : Ptx assembly aborted due to errors

The offending lines in the generated PTX:

        .section        .debug_pubnames
        {
.b32 LpubNames_end0-LpubNames_begin0    // Length of Public Names Info
LpubNames_begin0:
.b8 2                                   // DWARF Version
.b8 0
.b64 .debug_info                        // Offset of Compilation Unit Info
.b32 188                                // Compilation Unit Length
.b32 102                                // DIE offset
.b8 98                                  // External Name
.b8 0
.b32 141                                // DIE offset
.b8 100                                 // External Name
.b8 0
.b32 0                                  // End Mark
LpubNames_end0:
        }

I looks like PTX doesn't support labels or label arithmetic in sections (or at
all).

-- 
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/20200208/650004c9/attachment.html>


More information about the llvm-bugs mailing list