<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 --- - std::vector doesn't honor element alignment"
   href="http://llvm.org/bugs/show_bug.cgi?id=22634">22634</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>std::vector doesn't honor element alignment
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jacob.benoit.1@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13905" name="attach_13905" title="testcase">attachment 13905</a> <a href="attachment.cgi?id=13905&action=edit" title="testcase">[details]</a></span>
testcase

Even in C++11 mode, even with the C++11 alignas keyword, element alignment
isn't honored by std::vector.

$ c++ vectoralign.cpp -o a --std=c++11 && ./a
ctor 0x7fec03c03950
ctor 0x7fec03c03990

Attaching testcase.

I only tested the 3.5svn version that's installed on Mac OSX 10.9.5 here.

$ c++ --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

Note: homologous libstdc++ bug report:
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122</a></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>