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

    <tr>
        <th>Summary</th>
        <td>
            clang++: alias template ignores alignment given by `__attribute__((aligned(X)))`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    This code:

```c++
#include <iostream>
#include <cstdint>

template <typename T=void>
using TemplatedT __attribute__((aligned(8))) = uint32_t;

using ManualT __attribute__((aligned(8))) = uint32_t;

int main() {
    std::cout << "alignof Template: " << alignof(TemplatedT<>) << std::endl;
 std::cout << "alignof Manual:   " << alignof(ManualT) << std::endl;
}
```

prints ([godbolt](https://godbolt.org/z/KTG1YEaro))
```
alignof Template: 4
alignof Manual:   8
```

when executed with clang (in the version currently available as "trunk" on godbolt).

I would have expected both types to have an alignment of 8. I've [asked on StackOverflow](https://stackoverflow.com/questions/74899481/clang-ignores-attribute-aligned-when-used-with-an-alias-template), and the comments indicated this may be a bug, so I'm reporting this here.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE2v6kYM_TVmY4GCAyFZZHHv49I-VVUXZdGu0CRjyPROZmjG4aO_vpqQy6VP6L1NpVFAOY6Pz_HYKgRzcMwlLF9huZ6oXhrflT9zas3lcplUXl_LbWMC1l4zpC-QrCH5eGbJ7dRAr_Hc3lJqXG17zQjpF-ODdKxaSN-ewXUQbZx8osNTuD1aJUOEXI_sVMu4hXR98kbfY_tg3AG3Y6ze4m6nRDpT9cK7HVAOlCsb5WmgPAcqbgchXWNvnKS0E0hfH5lvOX9Vrlf2f0lonGCrjBu-LhBWI4qIGERHR9OX2vcStUL6BYFo4PD7uzRIX-Lrj4gRBso_tQ_Q262WIeiem52295p-SHlTHgnxOeVozQ-ZYLX-5pI8unLsjJOA0ZTl68HryluB5Roob0SOIeajDdBmhGa-OwBt_gHa_LL9af7nm-r86P4zjmf-Lf4LPerMv1PouWGHfOG6F9Z4NtJgbZU7xNKNQ2kYT9wF4x3WfdexE3tFdVLGqsoyqqiRpOvde3TTO_wQS8Xskecrnn1vNTbqxMiXI9eRr_LSYByAgOJvmHK3ZrTsBP0e8xl-BVqdGGH5qsI768jyu6j6_bcTd3vrz8-MDTHAjwGz2rdAm797DmK8C0Cb1SIvikU-B9oMeqfRto7D9D4Q03ESptGiaR_iPyPNVLmIqDD9GOKhUV9QOT3YVfs21h7QOG3qeHlR4n5p1RUrRoVVf4jxwQ_CWuz46DuJYznENdzxbKLLVBdpoSZczrMVZVmREk2akjOdVYt6xfs6yRVVmUpUzZqrjFfLYkkTU1JCaTJPaL4gSmiWLpKsKLK8yOpkvp_PYZFwq4ydWXtq48WbmBB6LpfFKs8nVlVsw7AtiRyfcQCBKC7ProzfTKv-EGCRWBMkfGYRI5bLwcxxW6YvODiF93U3mvzQ4YM5scPqipAl391Gf9y3EWTJpO9s-c0kGWn6aux0LGr8mR47_xfXArQZpMTmD1L_DQAA__-Tqtrc">