1-- { dg-do compile }
2-- { dg-options "-O2 -fdump-tree-optimized" }
3
4pragma Suppress (Overflow_Check);
5
6function Opt40 (X : Integer; Y : Integer) return Positive is
7   Z : Integer;
8begin
9   if X >= Y then
10      return 1;
11   end if;
12   Z := Y - X;
13   return Z;
14end;
15
16-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
17