Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sme/streaming_mode_1.c

raw
1 // { dg-options "" }
2
3 void sc_a () [[arm::streaming_compatible]];
4 void sc_a (); // { dg-error "conflicting types" }
5
6 void sc_b ();
7 void sc_b () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
8
9 void sc_c () [[arm::streaming_compatible]];
10 void sc_c () {} // { dg-error "conflicting types" }
11
12 void sc_d ();
13 void sc_d () [[arm::streaming_compatible]] {} // { dg-error "conflicting types" }
14
15 void sc_e () [[arm::streaming_compatible]] {}
16 void sc_e (); // { dg-error "conflicting types" }
17
18 void sc_f () {}
19 void sc_f () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
20
21 extern void (*sc_g) ();
22 extern void (*sc_g) () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
23
24 extern void (*sc_h) () [[arm::streaming_compatible]];
25 extern void (*sc_h) (); // { dg-error "conflicting types" }
26
27 //----------------------------------------------------------------------------
28
29 void s_a () [[arm::streaming]];
30 void s_a (); // { dg-error "conflicting types" }
31
32 void s_b ();
33 void s_b () [[arm::streaming]]; // { dg-error "conflicting types" }
34
35 void s_c () [[arm::streaming]];
36 void s_c () {} // { dg-error "conflicting types" }
37
38 void s_d ();
39 void s_d () [[arm::streaming]] {} // { dg-error "conflicting types" }
40
41 void s_e () [[arm::streaming]] {}
42 void s_e (); // { dg-error "conflicting types" }
43
44 void s_f () {}
45 void s_f () [[arm::streaming]]; // { dg-error "conflicting types" }
46
47 extern void (*s_g) ();
48 extern void (*s_g) () [[arm::streaming]]; // { dg-error "conflicting types" }
49
50 extern void (*s_h) () [[arm::streaming]];
51 extern void (*s_h) (); // { dg-error "conflicting types" }
52
53 //----------------------------------------------------------------------------
54
55 void mixed_a () [[arm::streaming]];
56 void mixed_a () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
57
58 void mixed_b () [[arm::streaming_compatible]];
59 void mixed_b () [[arm::streaming]]; // { dg-error "conflicting types" }
60
61 void mixed_c () [[arm::streaming]];
62 void mixed_c () [[arm::streaming_compatible]] {} // { dg-error "conflicting types" }
63
64 void mixed_d () [[arm::streaming_compatible]];
65 void mixed_d () [[arm::streaming]] {} // { dg-error "conflicting types" }
66
67 void mixed_e () [[arm::streaming]] {}
68 void mixed_e () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
69
70 void mixed_f () [[arm::streaming_compatible]] {}
71 void mixed_f () [[arm::streaming]]; // { dg-error "conflicting types" }
72
73 extern void (*mixed_g) () [[arm::streaming_compatible]];
74 extern void (*mixed_g) () [[arm::streaming]]; // { dg-error "conflicting types" }
75
76 extern void (*mixed_h) () [[arm::streaming]];
77 extern void (*mixed_h) () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
78
79 //----------------------------------------------------------------------------
80
81 void contradiction_1 () [[arm::streaming, arm::streaming_compatible]]; // { dg-warning "conflicts with attribute" }
82 void contradiction_2 () [[arm::streaming_compatible, arm::streaming]]; // { dg-warning "conflicts with attribute" }
83
84 int [[arm::streaming_compatible]] int_attr; // { dg-warning "only applies to function types" }
85 void [[arm::streaming_compatible]] ret_attr (); // { dg-warning "only applies to function types" }
86 void *[[arm::streaming]] ptr_attr; // { dg-warning "only applies to function types" }
87
88 typedef void s_callback () [[arm::streaming]];
89 typedef void sc_callback () [[arm::streaming_compatible]];
90
91 typedef void contradiction_callback_1 () [[arm::streaming, arm::streaming_compatible]]; // { dg-warning "conflicts with attribute" }
92 typedef void contradiction_callback_2 () [[arm::streaming_compatible, arm::streaming]]; // { dg-warning "conflicts with attribute" }
93
94 void (*contradiction_callback_ptr_1) () [[arm::streaming, arm::streaming_compatible]]; // { dg-warning "conflicts with attribute" }
95 void (*contradiction_callback_ptr_2) () [[arm::streaming_compatible, arm::streaming]]; // { dg-warning "conflicts with attribute" }
96
97 struct s {
98 void (*contradiction_callback_ptr_1) () [[arm::streaming, arm::streaming_compatible]]; // { dg-warning "conflicts with attribute" }
99 void (*contradiction_callback_ptr_2) () [[arm::streaming_compatible, arm::streaming]]; // { dg-warning "conflicts with attribute" }
100 };
101
102 //----------------------------------------------------------------------------
103
104 void keyword_ok_1 () __arm_streaming;
105 void keyword_ok_1 () __arm_streaming;
106
107 void keyword_ok_2 () __arm_streaming;
108 void keyword_ok_2 () [[arm::streaming]];
109
110 void keyword_ok_3 () [[arm::streaming]];
111 void keyword_ok_3 () __arm_streaming;
112
113 void keyword_ok_4 () __arm_streaming [[arm::streaming]];
114
115 void keyword_ok_5 () __arm_streaming_compatible;
116 void keyword_ok_5 () [[arm::streaming_compatible]];
117
118 //----------------------------------------------------------------------------
119
120 void keyword_contradiction_1 () __arm_streaming;
121 void keyword_contradiction_1 (); // { dg-error "conflicting types" }
122
123 void keyword_contradiction_2 ();
124 void keyword_contradiction_2 () __arm_streaming; // { dg-error "conflicting types" }
125
126 void keyword_contradiction_3 () __arm_streaming;
127 void keyword_contradiction_3 () [[arm::streaming_compatible]]; // { dg-error "conflicting types" }
128
129 void keyword_contradiction_4 () [[arm::streaming_compatible]];
130 void keyword_contradiction_4 () __arm_streaming; // { dg-error "conflicting types" }