gcc/testsuite/gnat.dg/atomic11.adb
raw| 1 | -- { dg-do compile } |
| 2 | |
| 3 | with Atomic11_Pkg1; use Atomic11_Pkg1; |
| 4 | |
| 5 | procedure Atomic11 is |
| 6 | |
| 7 | R1 : Rec1; |
| 8 | pragma Atomic (R1); |
| 9 | |
| 10 | R2 : Rec2; |
| 11 | pragma Volatile (R2); |
| 12 | |
| 13 | begin |
| 14 | R1.I := 0; |
| 15 | Proc1 (R1); -- { dg-warning "atomic actual passed by copy" } |
| 16 | R2.A(1) := 0; |
| 17 | Proc1 (R1); -- { dg-warning "atomic actual passed by copy" } |
| 18 | Proc2 (R2); -- { dg-warning "volatile actual passed by copy" } |
| 19 | end; |