<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 --- - clang++ crashes on casts to void of pack expansions"
   href="http://llvm.org/bugs/show_bug.cgi?id=16874">16874</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang++ crashes on casts to void of pack expansions
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.3
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm-bugs@quasiparticle.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Testcase:

struct S {
    static void foo() {}
};

template<typename... Args>
void run() {
    (void) (Args::foo()...);
}

int main() {
    run<S, S>();
}

Resulting error/stacktrace:

foo.cpp:8:10: error: cannot compile this scalar expression yet
        (void) (Args::foo()...);
                ^~~~~~~~~~~~~~
0  libLLVM-3.3.so  0x00007f7d8b889112 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  libLLVM-3.3.so  0x00007f7d8b888f79
2  libpthread.so.0 0x00007f7d8a9900e0
3  clang           0x00000000007b0b6a
clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType) + 1914
4  clang           0x0000000000562b02
5  clang           0x000000000086150e
6  clang           0x00000000008614fb
7  clang           0x0000000000862a3d
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 61
8  clang           0x0000000000826c5f
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 63
9  clang           0x0000000000831b7f
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 47
10 clang           0x0000000000564b66
11 clang           0x0000000000861938
12 clang           0x0000000000862a3d
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 61
13 clang           0x0000000000826c5f
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 63
14 clang           0x0000000000831b7f
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 47
15 clang           0x00000000008b6652
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 98
16 clang           0x00000000008b683f
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot) + 79
17 clang           0x000000000078d972
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&)
+ 82
18 clang           0x0000000000792014
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 484
19 clang           0x00000000007a042a
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 362
20 clang           0x00000000007a0e8b
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 283
21 clang           0x00000000007a1a4d
clang::CodeGen::CodeGenModule::EmitDeferred() + 125
22 clang           0x00000000007a1a89 clang::CodeGen::CodeGenModule::Release()
+ 9
23 clang           0x0000000000781ab0
24 clang           0x00000000008d024b clang::ParseAST(clang::Sema&, bool, bool)
+ 507
25 clang           0x0000000000639339 clang::FrontendAction::Execute() + 169
26 clang           0x000000000061a522
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 290
27 clang           0x0000000000605bc7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1591
28 clang           0x00000000006010c8 cc1_main(char const**, char const**, char
const*, void*) + 1208
29 clang           0x00000000005ffa6b main + 7899
30 libc.so.6       0x00007f7d8a0dba15 __libc_start_main + 245
31 clang           0x00000000006000d1
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
foo.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.23.2 -resource-dir /usr/bin/../lib/clang/3.3
-internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1
-internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/x86_64-unknown-linux-gnu
-internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/backward
-internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/x86_64-unknown-linux-gnu/c++/4.8.1
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.3/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /dev/shm -ferror-limit 19 -fmessage-length 78
-mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o /tmp/foo-NgSiHJ.o -x c++ foo.cpp 
1.    <eof> parser at end of file
2.    Per-file LLVM IR generation
3.    foo.cpp:6:6: Generating code for declaration 'run'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/foo-ToyHrB.cpp
clang: note: diagnostic msg: /tmp/foo-ToyHrB.sh
clang: note: diagnostic msg: 

********************</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>