Debian Codegraph @

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

raw
1 // { dg-options "" }
2
3 void normal_callee ();
4 void in_callee () [[arm::in("za")]];
5 void out_callee () [[arm::out("za")]];
6 void inout_callee () [[arm::inout("za")]];
7 void preserves_callee () [[arm::preserves("za")]];
8
9 struct callbacks {
10 void (*normal_ptr) ();
11 void (*in_ptr) () [[arm::in("za")]];
12 void (*out_ptr) () [[arm::out("za")]];
13 void (*inout_ptr) () [[arm::inout("za")]];
14 void (*preserves_ptr) () [[arm::preserves("za")]];
15 };
16
17 void
18 normal_caller (struct callbacks *c)
19 {
20 normal_callee ();
21 in_callee (); // { dg-error {call to a function that shares 'za' state from a function that has no 'za' state} }
22 out_callee (); // { dg-error {call to a function that shares 'za' state from a function that has no 'za' state} }
23 inout_callee (); // { dg-error {call to a function that shares 'za' state from a function that has no 'za' state} }
24 preserves_callee (); // { dg-error {call to a function that shares SME state from a function that has no SME state} }
25
26 c->normal_ptr ();
27 c->in_ptr (); // { dg-error {call to a function that shares 'za' state from a function that has no 'za' state} }
28 c->out_ptr (); // { dg-error {call to a function that shares 'za' state from a function that has no 'za' state} }
29 c->inout_ptr (); // { dg-error {call to a function that shares 'za' state from a function that has no 'za' state} }
30 c->preserves_ptr (); // { dg-error {call to a function that shares SME state from a function that has no SME state} }
31 }