<html>
    <head>
      <base href="https://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 --- - abort with "pure virtual method called", when a virtual function is called on a POD temporary passed as an argument (in program compiled w/ clang trunk -std=c++11)"
   href="https://llvm.org/bugs/show_bug.cgi?id=23165">23165</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>abort with "pure virtual method called", when a virtual function is called on a POD temporary passed as an argument (in program compiled w/ clang trunk -std=c++11)
          </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++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dholbert@mozilla.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>Created <span class=""><a href="attachment.cgi?id=14171" name="attach_14171" title="C++ testcase">attachment 14171</a> <a href="attachment.cgi?id=14171&action=edit" title="C++ testcase">[details]</a></span>
C++ testcase

STR:
 1. Compile attached program using clang 3.7 with -std=c++11:
     clang++-3.7 -std=c++11 test.cpp

   (Or use -std=gnu++0x)

 2. Run the resulting a.out

ACTUAL RESULTS:
The program aborts with:
<span class="quote">> pure virtual method called
> terminate called without an active exception
> Aborted (core dumped)</span >

EXPECTED RESULTS:
No abort; virtual function should run successfully.

I get EXPECTED RESULTS if I drop the "-std=c++11" command-line argument. I also
get EXPECTED RESULTS from clang++-3.6 (with the c++11 command-line argument
included).  So this is a regression, or at least a behavior-change.</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>