Debian Codegraph @

gcc/testsuite/gnat.dg/opt86c.adb

raw
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 Opt86c 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 Val16 | Val8 | Val26 | Val2 | Val10 then
19 raise Program_Error;
20 end if;
21
22 if S2 not in Val16 | Val8 | Val26 | Val2 | Val10 then
23 raise Program_Error;
24 end if;
25
26 if S3 = Val3 or S3 = Val25 or S3 = Val13 or S3 = Val29 or S3 = Val11 then
27 raise Program_Error;
28 end if;
29
30 if S4 /= Val3 and S4 /= Val25 and S4 /= Val13 and S4 /= Val29 and s4 /= Val11 then
31 raise Program_Error;
32 end if;
33
34 end;
35
36 -- { dg-final { scan-tree-dump-not "> 26" "optimized" } }
37 -- { dg-final { scan-tree-dump-not "> 29" "optimized" } }