PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gnat.dg / contract1.adb
blob286fbc557ca962a0d4181f092e86e21c1c0ed06e
1 -- { dg-do compile }
2 -- { dg-options "-gnatd.F -gnatwa" }
4 with Ada.Dispatching;
6 procedure Contract1 with SPARK_Mode is
8 function Foo return Boolean is
9 begin
10 Ada.Dispatching.Yield;
11 return True;
12 end Foo;
14 Dummy : constant Integer := 0;
16 begin
17 if Foo and then True then
18 raise Program_Error;
19 end if;
20 end Contract1;