OSDN Git Service

60c48403e25bf0f4e49271f5151fb2109ea3f838
[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
4 // You can make NON-template typedefs with a large alignment.
5 typedef double AlignedDoubleType __attribute__((aligned(16)));
6
7 template <typename RealType>
8 RealType f(const RealType* p)
9 {
10   // But if you use a template parameter it complains.
11   typedef RealType AlignedRealType __attribute__((aligned(16)));
12
13   return p[0];
14 }
15
16 double f2(const double* p)
17 {
18   return f<double>(p);
19 }