OSDN Git Service

2009-07-17 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / tmplattr4.C
1 // PR c++/7586
2 // { dg-do run }
3
4 template<typename T>
5 int f()
6 {
7   typedef unsigned char type[sizeof (T)]
8     __attribute((aligned(__alignof(T))));
9
10   return __alignof (type);
11 }
12
13 int main()
14 {
15   if (f<int>() == __alignof (int))
16     return 0;
17   else
18     return 1;
19 }