OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / attrib35.C
1 // { dg-do compile { target i?86-*-* x86_64-*-* } }
2 // { dg-options "-O3 -msse2" }
3 // { dg-require-effective-target sse2 }
4
5 // You can make NON-template typedefs with a large alignment.
6 typedef double AlignedDoubleType __attribute__((aligned(16)));
7
8 template <typename RealType>
9 RealType f(const RealType* p)
10 {
11   // But if you use a template parameter it complains.
12   typedef RealType AlignedRealType __attribute__((aligned(16)));
13
14   return p[0];
15 }
16
17 double f2(const double* p)
18 {
19   return f<double>(p);
20 }