Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/attrib35.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |