<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 - Over-eager template instantiation breaks libstdc++ variant from gcc 10 trunk"
   href="https://bugs.llvm.org/show_bug.cgi?id=43087">43087</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Over-eager template instantiation breaks libstdc++ variant from gcc 10 trunk
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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++17
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>David.Truby@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22414" name="attach_22414" title="Simple reproducing case">attachment 22414</a> <a href="attachment.cgi?id=22414&action=edit" title="Simple reproducing case">[details]</a></span>
Simple reproducing case

libstdc++ 10 has changes to its variant implementation that cause compilation
to fail with clang. I've attached a file that works with clang and libc++ and
also with gcc and libstdc++. It seems that clang is over-eager when
instantiating the templates and goes looking for a constructor further down the
nested stack when there's a valid one higher up.

The same problem did manifest with libc++, but was fixed by this commit:
<a href="https://github.com/llvm-mirror/libcxx/commit/301501fb78f90d65cec68f22144f3446a571e553#diff-9308c8fc46861ae969c076f9b7637013">https://github.com/llvm-mirror/libcxx/commit/301501fb78f90d65cec68f22144f3446a571e553#diff-9308c8fc46861ae969c076f9b7637013</a>
However, since clang has had the same problem with both libc++ and libstdc++,
and gcc doesn't have the same problem with libstdc++, I suspect this represents
a bug at the clang end.</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>