<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 when compiling recursive variadic template expression"
   href="http://llvm.org/bugs/show_bug.cgi?id=18252">18252</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang crashes when compiling recursive variadic template expression
          </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++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>oakad@yahoo.com
          </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>The program in question tests a particular case of variadic implementation of
boost::mpl::bind metafunction. gcc will compile the program successfully,
producing the following output (the typeid().name() of the offending type):

m1.1:
ucpf::yesod::mpl::protect<ucpf::yesod::mpl::bind<ucpf::yesod::mpl::quote<ucpf::yesod::mpl::plus,
ucpf::yesod::mpl::void_>, ucpf::yesod::mpl::arg<0l, 0l>,
ucpf::yesod::mpl::arg<1l, 0l> > >

Unfortunately, it is rather difficult to minimize the test case, as even small
modifications to the source either make compilation fail (with reasonable
errors) or compile but result in incorrect behavior. gcc appears to handle the
code in question just fine.

Command line:
/usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all
-disable-f
ree -disable-llvm-verifier -main-file-name apply3.cpp -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tabl
es -fuse-init-array -target-cpu x86-64 -target-linker-version
2.23.52.0.2.201304
23 -std=c++11 -fdeprecated-macro -ferror-limit 19 -fmessage-length 80
-mstackrea
lign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions
-f
exceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option
-vector
ize-loops -x c++ apply3-ii1vni.cpp</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>