summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/volatile3.adb
blob: bd0e96a27c6e06f1f1a3f3ce98f100ac46cf7ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- { dg-do compile }
-- { dg-options "-O2" }

procedure volatile3 is

   v1 : Integer := 0;
   v2 : Integer := 0;
   pragma Volatile (v1);
   pragma Volatile (v2);
begin
   if v1 /= v2 then
      raise Program_Error;
   end if;
end;

-- { dg-final { scan-assembler "__gnat_rcheck" } }