<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 --- - Crash when asking __imag__ 1.0 through a complex template"
   href="http://llvm.org/bugs/show_bug.cgi?id=16087">16087</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when asking __imag__ 1.0 through a complex template
          </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>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>georgellvmb@oss3d.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>Compiling the code code below crashes with the following assert:

Assertion failed: getValueKind() == VK_LValue, file
D:\CODE\vinext-tests\3rdparty\llvm\tools\clang\lib\AST\ExprClassification.cpp,
line 56

====== CODE:

template<typename T>
inline constexpr const __typeof__(__real__ *((T*)0)) &real(const T&a) { return
__real__ a; }

template<typename T>
inline constexpr const __typeof__(__imag__ *((T*)0)) &imag(const T&a) { return
__imag__ a; }

int main()
{
    int t = imag(0.0);
    return 0;
}</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>