<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 --- - Wrong templated member initializations done for locally-defined structs with same name"
   href="http://llvm.org/bugs/show_bug.cgi?id=21376">21376</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong templated member initializations done for locally-defined structs with same name
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>John.Thompson.JTSoftware@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>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=13246" name="attach_13246" title="Reduced reproduction sample">attachment 13246</a> <a href="attachment.cgi?id=13246&action=edit" title="Reduced reproduction sample">[details]</a></span>
Reduced reproduction sample

In a proprietary unit test that worked with a previous version of clang (Sony's
Orbis flavor) and other compilers, in a new version of the compiler some code
started breaking.  Basically I define some structs with the same names in
separate local blocks with templated members to mimic the layout of a memory
arena in a templated function with different alignments, but in the code
generated, they all seem to reference the initializer for the first version of
the struct, such that later members don't get initialized.  The work-around is
to use different names for the structs.  I've enclosed a reduced repo.  See the
comments in the repo for further details.

Thanks.</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>