1// PR c++/7586
2// { dg-do run }
3
4template<typename T>
5int f()
6{
7  typedef unsigned char type[sizeof (T)]
8    __attribute((aligned(__alignof(T))));
9
10  return __alignof (type);
11}
12
13int main()
14{
15  if (f<int>() == __alignof (int))
16    return 0;
17  else
18    return 1;
19}
20