| 1 |
-- { dg-do compile } |
| 2 |
-- { dg-options "-O2 -fdump-tree-optimized" } |
| 3 |
|
| 4 |
with Ada.Command_Line; use Ada.Command_Line; |
| 5 |
with Opt86_Pkg; use Opt86_Pkg; |
| 6 |
|
| 7 |
procedure Opt86a is |
| 8 |
|
| 9 |
S1, S2, S3, S4 : Enum; |
| 10 |
|
| 11 |
begin |
| 12 |
|
| 13 |
S1 := Enum'Value (Argument (1)); |
| 14 |
S2 := Enum'Value (Argument (2)); |
| 15 |
S3 := Enum'Value (Argument (3)); |
| 16 |
S4 := Enum'Value (Argument (4)); |
| 17 |
|
| 18 |
if S1 in Val2 | Val3 | Val9 then |
| 19 |
raise Program_Error; |
| 20 |
end if; |
| 21 |
|
| 22 |
if S2 not in Val2 | Val3 | Val9 then |
| 23 |
raise Program_Error; |
| 24 |
end if; |
| 25 |
|
| 26 |
if S3 = Val1 or else S3 = Val4 or else S3 = Val8 then |
| 27 |
raise Program_Error; |
| 28 |
end if; |
| 29 |
|
| 30 |
if S4 /= Val1 and S4 /= Val4 and S4 /= Val8 then |
| 31 |
raise Program_Error; |
| 32 |
end if; |
| 33 |
|
| 34 |
end; |
| 35 |
|
| 36 |
-- { dg-final { scan-tree-dump-times ">>" 4 "optimized" } } |