1 /* Functional tests for the "target" attribute and pragma. */
4 /* { dg-require-effective-target target_attribute } */
5 /* { dg-require-effective-target s390_vx } */
6 /* { dg-options "-march=z13 -mvx -mzarch" } */
8 #define V16 __attribute__ ((vector_size(16)))
9 #pragma GCC push_options
10 #pragma GCC target ("arch=z900,no-vx")
11 __attribute__ ((noinline
))
12 void foo (char *d
, int *off
)
19 s_t s
= { 1,{ 0,11,22,33,44,55,66,77,88,99,101,111,121,131,141,151 }};
20 *off
= __builtin_offsetof(s_t
, vc
);
21 __builtin_memcpy(d
, &s
.vc
, 16);
23 #pragma GCC pop_options
25 #pragma GCC push_options
26 #pragma GCC target ("no-vx")
27 __attribute__ ((noinline
))
28 void bar (char *d
, int *off
)
35 s_t s
= { 1,{ 0,11,22,33,44,55,66,77,88,99,101,111,121,131,141,151 }};
36 *off
= __builtin_offsetof(s_t
, vc
);
37 __builtin_memcpy(d
, &s
.vc
, 16);
39 #pragma GCC pop_options
41 int main(int argc
, char **argv
)
44 char buf2
[16] = { 0 };