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

            Bug ID: 47287
           Summary: codeview assertion fails on lowerBound
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 46725

Created attachment 23885
  --> https://bugs.llvm.org/attachment.cgi?id=23885&action=edit
IR for the unboxed-closures-unique-type-id.rs test

We encountered this assertion in Rust x86_64-msvc trying to upgrade to LLVM 11.
https://github.com/rust-lang/rust/pull/73526#issuecomment-678576555

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
1595   │     assert(!Subrange->getRawLowerBound() &&
1596   │            "codeview doesn't support subranges with lower bounds");


The IR for that failed test is attached. It contains this:

    !157 = !DISubrange(count: 3, lowerBound: 0)

The actual assertion was changed in D80197, specifically here:
https://github.com/llvm/llvm-project/commit/d20bf5a7258d4b6a7f017a81b125275dac1aa166#diff-8412e58a7e99d6349b9f9418af573792

I confirmed that our IR passes the assertion before that commit, when it
checked "Subrange->getLowerBound() == 0". I think that
"!Subrange->getRawLowerBound()" is not equivalent though because that raw
return value is a "Metadata *", so the assertion is now checking that it's
NULL. This is different than having the lowerBound present with a constant
value 0.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=46725
[Bug 46725] [meta] 11.0.0 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to