aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/renaming6.adb
blob: e26c1dffce083c9ab144c53878f0f782c3f79201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- { dg-do compile }
-- { dg-options "-fdump-tree-original" }

package body Renaming6 is

  function Get_I return Integer is
  begin
    return I;
  end;

  procedure Set_I (Val : Integer) is
  begin
    I := Val;
  end;

  function Get_J return Integer is
  begin
    return X;
  end;

  procedure Set_J (Val : Integer) is
  begin
    X := Val;
  end;

end Renaming6;

-- { dg-final { scan-tree-dump-times "atomic_load" 2 "original" } }
-- { dg-final { scan-tree-dump-times "atomic_store" 2 "original" } }
-- { dg-final { scan-tree-dump-not "x" "original" } }