<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Assertion `VariableDIE && "Static member decl has no context?"' failed"
   href="http://llvm.org/bugs/show_bug.cgi?id=16995">16995</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `VariableDIE && "Static member decl has no context?"' failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>clang@martinien.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11095" name="attach_11095" title="Reproduction files">attachment 11095</a> <a href="attachment.cgi?id=11095&action=edit" title="Reproduction files">[details]</a></span>
Reproduction files

Hi,

the attached reproduction script causes a clang assertion here:

clang:
/sapmnt/trextest/trex_test/mrich/llvm34_trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1356:
void llvm::CompileUnit::createGlobalVariableDIE(const llvm::MDNode *):
Assertion `VariableDIE && "Static member decl has no context?"' failed.
0  clang           0x000000000209b565 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  clang           0x000000000209b9b3
2  libpthread.so.0 0x00002b8ea8d166b0
3  libc.so.6       0x00002b8ea9d25945 gsignal + 53
4  libc.so.6       0x00002b8ea9d26f21 abort + 385
5  libc.so.6       0x00002b8ea9d1e810 __assert_fail + 240
6  clang           0x0000000001ace30d
llvm::CompileUnit::createGlobalVariableDIE(llvm::MDNode const*) + 461
7  clang           0x0000000001aa6f05 llvm::DwarfDebug::beginModule() + 549
8  clang           0x0000000001aa6c4c
llvm::DwarfDebug::DwarfDebug(llvm::AsmPrinter*, llvm::Module*) + 2028
9  clang           0x0000000001a98a91
llvm::AsmPrinter::doInitialization(llvm::Module&) + 593
10 clang           0x0000000002039126
llvm::FPPassManager::doInitialization(llvm::Module&) + 86
11 clang           0x00000000020392fe
llvm::MPPassManager::runOnModule(llvm::Module&) + 174
12 clang           0x0000000002039a9b llvm::PassManagerImpl::run(llvm::Module&)
+ 539
13 clang           0x0000000002039c0a llvm::PassManager::run(llvm::Module&) +
10
14 clang           0x0000000000846077
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 6039
15 clang           0x0000000000843abb
16 clang           0x00000000009a0c53 clang::ParseAST(clang::Sema&, bool, bool)
+ 515
17 clang           0x0000000000842f22 clang::CodeGenAction::ExecuteAction() +
514
18 clang           0x00000000006c57c1 clang::FrontendAction::Execute() + 113
19 clang           0x00000000006a3b8d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 909
20 clang           0x000000000068ac80
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3104
21 clang           0x00000000006825cf cc1_main(char const**, char const**, char
const*, void*) + 703
22 clang           0x0000000000688da4 main + 8388
23 libc.so.6       0x00002b8ea9d11bc6 __libc_start_main + 230
24 clang           0x0000000000682249


This works on clang 3.3, so it is a regression on trunk.

Best regards,
Martin</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>