[llvm-bugs] [Bug 29097] New: r279314 broke modules selfhost

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 22 17:07:01 PDT 2016


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

            Bug ID: 29097
           Summary: r279314 broke modules selfhost
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: biancacristinacristescu at gmail.com,
                    dexonsmith at apple.com, dgregor at apple.com,
                    llvm-bugs at lists.llvm.org, vvasilev at cern.ch
    Classification: Unclassified

Clang modules selfhost bots are currently failing during IR emission with:

clang-3.8:
/home/buildbot/modules-slave-1/clang-x86_64-linux-selfhost-modules/llvm.src/tools/clang/include/clang/AST/ExprCXX.h:1067:
clang::Expr *clang::CXXDefaultInitExpr::getExpr(): Assertion
`Field->getInClassInitializer() && "initializer hasn't been parsed"' failed.
[...]
3.   
/home/buildbot/modules-slave-1/clang-x86_64-linux-selfhost-modules/llvm.src/include/llvm/ADT/ilist.h:199:3:
Generating code for declaration
'llvm::ilist_iterator<llvm::Instruction>::ilist_iterator'

I would guess the problem is that we merged multiple FieldDecls together, and
then asked the wrong declaration of the field for its initializer. (It's valid
for one FieldDecl for a field to have an initializer and another FieldDecl to
not have one, since we lazily instantiate the initializer if the field is a
member of a class template, and we don't attempt to accomodate that.)

Once we have a reduced testcase, we can presumably fix this by copying the
initializer onto the canonical declaration whenever we merge FieldDecls, and
making FieldDecl::getInClassInitializer look on the canonical declaration.

-- 
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/20160823/6d06fadf/attachment-0001.html>


More information about the llvm-bugs mailing list