PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gnat.dg / overflow_sum3.adb
blobd10784310ae43e31e9e6a3a8893f9e13945a5cbb
1 -- { dg-do run }
2 -- { dg-options "-gnato" }
4 procedure Overflow_Sum3 is
6 function Ident (I : Integer) return Integer is
7 begin
8 return I;
9 end;
11 X : Short_Short_Integer := Short_Short_Integer (Ident (127));
13 begin
14 if X+1 <= 127 then
15 raise Program_Error;
16 end if;
17 exception
18 when Constraint_Error => null;
19 end;