<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 during CodeGen if _GUID is incomplete"
   href="http://llvm.org/bugs/show_bug.cgi?id=16856">16856</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang crashes during CodeGen if _GUID is incomplete
          </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>All
          </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>david.majnemer@gmail.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>consider the following program:
struct __declspec(uuid("{12345678-1234-1234-1234-1234567890aB}")) uuid;
const struct _GUID *G = &__uuidof(uuid);

We will crash in clang::CodeGen::CodeGenModule::EmitUuidofInitializer because
our attempt to enter clang::CodeGen::CodeGenModule::EmitConstantValue will be
foiled: the type of the constant value is incomplete.

Being more compatible with cl would yield us a "straightforward" result with
the following sequence:
1. struct __s_GUID would be a builtin type with the same layout as struct
_GUID.
2. struct _GUID would be a known incomplete type.
3. The constant would be emitted with type struct __s_GUID.
4. __uuidof would give back a pointer of type struct _GUID.</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>