Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / cpp0x / gen-attrs-35.C
blobccae6f0c8486f803de874ccb918b80f169c74af9
1 // { dg-do compile { target i?86-*-* x86_64-*-* } }
2 // { dg-require-effective-target c++11 }
3 // { dg-options "-O3 -msse2" }
4 // { dg-require-effective-target sse2 }
6 // You can make NON-template typedefs with a large alignment.
7 typedef double AlignedDoubleType [[gnu::aligned(16)]];
9 template <typename RealType>
10 RealType f(const RealType* p)
12   // But if you use a template parameter it complains.
13   typedef RealType AlignedRealType [[gnu::aligned(16)]];
15   return p[0];
18 double f2(const double* p)
20   return f<double>(p);