c++: constrained lambda error-recovery [PR108972]
[official-gcc.git] / gcc / testsuite / gnat.dg / opt16.adb
blobd8e93bda2a1d9b83263da8cc85851eb33378c25e
1 -- { dg-do compile }
2 -- { dg-options "-O2 -gnatws" }
4 procedure Opt16 is
6 generic
7 type T (<>) is private;
8 V, V1 : T;
9 with function F1 (X : T) return T;
10 package GP is
11 R : Boolean := F1 (V) = V1;
12 end GP;
14 type AB is array (Boolean range <>) of Boolean;
16 begin
17 for I1 in Boolean loop
18 for I2 in Boolean loop
19 declare
20 B1 : Boolean := I1;
21 B2 : Boolean := I2;
22 AB1 : AB (Boolean) := (I1, I2);
23 T : AB (B1 .. B2) := (B1 .. B2 => True);
24 F : AB (B1 .. B2) := (B1 .. B2 => False);
26 package P is new GP (AB, AB1, NOT AB1, "NOT");
28 begin
29 null;
30 end;
31 end loop;
32 end loop;
33 end;