summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/opt50.adb
blob: f930d0980afb38a1c73733a84022ad31ab4082f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- { dg-do run }
-- { dg-options "-O3 -gnatn" }

with Opt50_Pkg; use Opt50_Pkg;

procedure Opt50 is
  B : Boolean;
  E : Enum;
begin
  Get ("four", E, B);
  if B = True then
    raise Program_Error;
  end if;
  Get ("three", E, B);
  if B = False then
    raise Program_Error;
  end if;
  declare
    A : Enum_Boolean_Array (One .. E) := (others => True);
  begin
    Set (A);
  end;
end Opt50;