<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - loader_uninitialized used on a class-template causes a crash and assert"
   href="https://bugs.llvm.org/show_bug.cgi?id=47169">47169</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>loader_uninitialized used on a class-template causes a crash and assert
          </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>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>erich.keane@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>template<typename T> struct Foo{};
Foo<int> Global __attribute__((loader_uninitialized));

Invocation is simply clang -cc1 filename.cpp.



clang: /iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:434:
clang::CXXRecordDecl::DefinitionData& clang::CXXRecordDecl::data() const:
Assertion `DD && "queried property of class with no definition"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff67471f7 in raise () from /lib64/libc.so.6
(gdb) (gdb) bt
#0  0x00007ffff67471f7 in raise () from /lib64/libc.so.6
#1  0x00007ffff67488e8 in abort () from /lib64/libc.so.6
#2  0x00007ffff6740266 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff6740312 in __assert_fail () from /lib64/libc.so.6
#4  0x0000000004fb53c8 in clang::CXXRecordDecl::data (this=0x115292a8) at
/iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:434
#5  0x0000000005040d2e in clang::CXXRecordDecl::hasDefaultConstructor
(this=0x115292a8) at
/iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:738
#6  0x0000000005040eca in clang::CXXRecordDecl::hasTrivialDefaultConstructor
(this=0x115292a8) at
/iusers/ekeane1/workspaces/sycl/clang/include/clang/AST/DeclCXX.h:1175
#7  0x0000000007c96a03 in clang::Sema::ActOnUninitializedDecl (this=0x115190e0,
RealDecl=0x11529468) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Sema/SemaDecl.cpp:12476
#8  0x00000000079c8078 in
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes (this=0x115236d0,
D=..., TemplateInfo=..., FRI=0x0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/ParseDecl.cpp:2332
#9  0x00000000079c679e in clang::Parser::ParseDeclGroup (this=0x115236d0,
DS=..., Context=clang::DeclaratorContext::FileContext, DeclEnd=0x0, FRI=0x0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/ParseDecl.cpp:1986
#10 0x00000000079a911e in clang::Parser::ParseDeclOrFunctionDefInternal
(this=0x115236d0, attrs=..., DS=..., AS=clang::AS_none) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:1099
#11 0x00000000079a91d8 in clang::Parser::ParseDeclarationOrFunctionDefinition
(this=0x115236d0, attrs=..., DS=0x0, AS=clang::AS_none) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:1115
#12 0x00000000079a86ba in clang::Parser::ParseExternalDeclaration
(this=0x115236d0, attrs=..., DS=0x0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:935
#13 0x00000000079a77e9 in clang::Parser::ParseTopLevelDecl (this=0x115236d0,
Result=..., IsFirstDecl=false) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/Parser.cpp:683
#14 0x00000000079a321f in clang::ParseAST (S=..., PrintStats=false,
SkipFunctionBodies=false) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Parse/ParseAST.cpp:158
#15 0x000000000582b7fb in clang::ASTFrontendAction::ExecuteAction
(this=0x114ca1d0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Frontend/FrontendAction.cpp:1057
#16 0x000000000582b163 in clang::FrontendAction::Execute (this=0x114ca1d0) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Frontend/FrontendAction.cpp:950
#17 0x00000000057c5d68 in clang::CompilerInstance::ExecuteAction
(this=0x114c6e50, Act=...) at
/iusers/ekeane1/workspaces/sycl/clang/lib/Frontend/CompilerInstance.cpp:984
#18 0x00000000059a5336 in clang::ExecuteCompilerInvocation (Clang=0x114c6e50)
at
/iusers/ekeane1/workspaces/sycl/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278
#19 0x000000000224e26d in cc1_main (Argv=llvm::ArrayRef of length 2 = {...},
Argv0=0x7fffffffb55d "/export/iusers/ekeane1/workspaces/sycl/build/bin/clang",
MainAddr=0x22429d2 <GetExecutablePath[abi:cxx11](char const*, bool)>) at
/iusers/ekeane1/workspaces/sycl/clang/tools/driver/cc1_main.cpp:240
#20 0x0000000002244087 in ExecuteCC1Tool (ArgV=llvm::SmallVector of Size 3,
Capacity 256 = {...}) at
/iusers/ekeane1/workspaces/sycl/clang/tools/driver/driver.cpp:330
#21 0x0000000002244788 in main (argc_=3, argv_=0x7fffffffaad8) at
/iusers/ekeane1/workspaces/sycl/clang/tools/driver/driver.cpp:407</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>