1 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-linux-gnu %s
4 typedef int __attribute__((mode(byte
))) __attribute__((vector_size(256))) vec_t1
;
5 typedef int __attribute__((mode(QI
))) __attribute__((vector_size(256))) vec_t2
;
6 typedef int __attribute__((mode(SI
))) __attribute__((vector_size(256))) vec_t3
;
7 typedef int __attribute__((mode(DI
))) __attribute__((vector_size(256)))vec_t4
;
8 typedef float __attribute__((mode(SF
))) __attribute__((vector_size(256))) vec_t5
;
9 typedef float __attribute__((mode(DF
))) __attribute__((vector_size(256))) vec_t6
;
10 typedef float __attribute__((mode(XF
))) __attribute__((vector_size(256))) vec_t7
;
12 typedef int v8qi
__attribute__ ((mode(QI
))) __attribute__ ((vector_size(8)));
13 typedef int v8qi
__attribute__ ((mode(V8QI
)));
14 // expected-warning@-1{{specifying vector types with the 'mode' attribute is deprecated; use the 'vector_size' attribute instead}}
16 typedef float v4sf
__attribute__((mode(V4SF
)));
17 // expected-warning@-1{{specifying vector types with the 'mode' attribute is deprecated; use the 'vector_size' attribute instead}}
18 typedef float v4sf
__attribute__((mode(SF
))) __attribute__ ((vector_size(16)));
21 typedef float __attribute__((mode(QC
))) __attribute__((vector_size(256))) vec_t8
;
22 // expected-error@-1{{unsupported machine mode 'QC'}}
23 // expected-error@-2{{type of machine mode does not match type of base type}}
24 typedef _Complex
float __attribute__((mode(HC
))) __attribute__((vector_size(256))) vec_t9
;
25 // expected-error@-1{{invalid vector element type '_Complex float'}}
26 typedef int __attribute__((mode(SC
))) __attribute__((vector_size(256))) vec_t10
;
27 // expected-error@-1{{type of machine mode does not match type of base type}}
28 // expected-error@-2{{type of machine mode does not support base vector types}}
29 typedef float __attribute__((mode(DC
))) __attribute__((vector_size(256))) vec_t11
;
30 // expected-error@-1{{type of machine mode does not match type of base type}}
31 // expected-error@-2{{type of machine mode does not support base vector types}}
32 typedef _Complex
float __attribute__((mode(XC
))) __attribute__((vector_size(256))) vec_t12
;
33 // expected-error@-1{{invalid vector element type '_Complex float'}}
34 typedef int __attribute__((mode(V3QI
))) v3qi
;
35 // expected-error@-1{{unknown machine mode 'V3QI'}}