Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.dg / ext / alias-decl-attr4.C
blob9bafc42342888b665a243a6bcfc01457ded4dfc3
1 // { dg-do run { target c++11 } }
3 using global_vector_type  __attribute__((vector_size(16))) = float;
5 template <class T> struct A
7     using type = T;
8 };
10 template < typename Val > struct S
12     using vector_type __attribute__((vector_size(16))) =
13         typename A<Val>::type;
14         typedef Val vector_type2 __attribute__((vector_size(16)));
15     int pr_size() { return sizeof(vector_type); }
16     int pr_size2() { return sizeof(vector_type2); }
19 int main()
21   if (sizeof (S<float>::vector_type) != sizeof (global_vector_type))
22     return 1;
23   if (sizeof (S<float>::vector_type2) != sizeof (global_vector_type))
24     return 2;
26   S<float> x;
27   if (x.pr_size() != sizeof (global_vector_type))
28     return 3;
29   if (x.pr_size2() != sizeof (global_vector_type))
30     return 4;
31   
32   return 0;