c++: constrained lambda error-recovery [PR108972]
[official-gcc.git] / gcc / testsuite / gnat.dg / array16.adb
blob23f5fbd099c84246a8f24988a47f12613675e742
1 -- { dg-do compile }
2 -- { dg-options "-O -gnatn -fdump-tree-optimized" }
4 package body Array16 is
6 function F1 (A : access My_T1) return My_T1 is
7 begin
8 return A.all;
9 end;
11 function F2 (A : access My_T2) return My_T2 is
12 begin
13 return A.all;
14 end;
16 procedure Proc (A : access My_T1; B : access My_T2) is
17 L1 : My_T1 := F1(A);
18 L2 : My_T2 := F2(B);
19 begin
20 if L1.D = 0 and then L2(1) = 0 then
21 raise Program_Error;
22 end if;
23 end;
25 end Array16;
27 -- { dg-final { scan-tree-dump-not "secondary_stack" "optimized" } }