<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59486>59486</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            structure alignment seems broken when targeting windows
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          adrianstephens
      </td>
    </tr>
</table>

<pre>
    When I put a 16-byte, 4 byte aligned field in a structure, the structure becomes 16 byte aligned. This only happens when the target is x86_64-pc-windows (i.e. it does not happen on x86_64-pc). It seems to have started in clang 3.6.
```

typedef __attribute__((__ext_vector_type__(4),__aligned__(4))) float V;
static_assert(alignof(V)==4, "?");

struct S {
        V       v;
};
static_assert(alignof(S)==4, "?");
```
gives
error: static assertion failed due to requirement 'alignof(S) == 4': ?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU01vpDAM_TXmYg0CQ_k4cGg7GqnnrrpHFMBAdhnCJmba-ferwOxOe6sUhWD8_J7Ni3JODzNzBQ9P8HAM1CqjsZXqrFazE15Gnl3QmO5a_Rx5xhdcVkGFcXZorsJAz5iiP6GafKEOe81Th3pGhU7s2spqtzQZ-R7AhltzZodx9gUd4o9ROzTzdMVRLQvPDt89r0eLsgMLaocfRVZn6WFpD-967sy7Q6BChxyiFuwMO5yN3Aqgme_5QGWIL4KO-exQDI7q4mUpK7yJbic1D5iEWQjREaJHyKLb2l-3Xa4Ld9xjXSsRq5tVuK6BCqCirvlD6gu3Ymzt87YPKVAJ9FzXtzY_Bf3CfjJK8A2Sp53AiRLd1so5tgJUbDDTAxVvHpEcITmmfqhABMnJ7z789FnkPmt8Rcj_x8s3iMrLPTE_foPy9TuUX8c06Au7_cjWGgvJI-4EuBNoM2Ov9MQddiv7H2H5z6otn3kWBMq_0uPOjylQ7mtBcgq6KunKpFQBV3GWR0WZFxQHY5WnWaFKylTfRCruuiQrc0pjojZPO0ryQFcUEcUUJxHFeRSHfZtT1rRtmjQd90kKacRnpadwmi7n0Ngh0M6tXD2UaZEFk2p4cv_ui6180qFZBwdpNGkn7g4TLRNXd9NvTW0d7v5rrPnN883gm7n1PODN0sFqp2oUWRwkj0AnoNOgZVybsDVnoJNnuT0OizW_uBWg06bUAZ02sX8DAAD__40RMrs">