OSDN Git Service

* tree-ssa-ccp.c (valid_lattice_transition): Clarify comment
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / atomic6_7.adb
1 -- { dg-do compile }
2 -- { dg-options "-fdump-tree-gimple" }
3
4 with Atomic6_Pkg; use Atomic6_Pkg;
5
6 procedure Atomic6_7 is
7   My_Atomic  : R;
8   Temp : Integer;
9 begin
10
11   My_Atomic.Counter1 := Counter2;
12
13   My_Atomic.Timer1 := Timer2;
14
15   My_Atomic.Counter1 := Int(My_Atomic.Timer1);
16   My_Atomic.Timer1 := Integer(My_Atomic.Counter1);
17
18   Temp := Integer(My_Atomic.Counter1);
19   My_Atomic.Counter1 := Int(Temp);
20
21   Temp := My_Atomic.Timer1;
22   My_Atomic.Timer1 := Temp;
23
24 end;
25
26 -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&my_atomic.counter1" 2 "gimple"} }
27 -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&atomic6_pkg__counter2" 1 "gimple"} }
28 -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&my_atomic.timer1" 2 "gimple"} }
29 -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&atomic6_pkg__timer2" 1 "gimple"} }
30 -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*&temp" 0 "gimple"} }
31 -- { dg-final { scan-tree-dump-times "atomic_load\[^\n\r\]*ptr" 0 "gimple"} }
32
33 -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&my_atomic.counter1" 3 "gimple"} }
34 -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&atomic6_pkg__counter2" 0 "gimple"} }
35 -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&my_atomic.timer1" 3 "gimple"} }
36 -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&atomic6_pkg__timer2" 0 "gimple"} }
37 -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*&temp" 0 "gimple"} }
38 -- { dg-final { scan-tree-dump-times "atomic_store\[^\n\r\]*ptr" 0 "gimple"} }
39
40 -- { dg-final { cleanup-tree-dump "gimple" } }