1-- { dg-do compile }
2-- { dg-options "-gnatws -O2 -fdump-tree-optimized" }
3
4with System; use System;
5with System.CRTL; use System.CRTL;
6
7function Opt60 (Size : size_t) return System.Address is
8  Result : System.Address;
9begin
10  Result := malloc (Size);
11  if Result = System.Null_Address then
12    raise Program_Error;
13  end if;
14  return Result;
15end;
16
17-- { dg-final { scan-tree-dump "== 0B" "optimized" } }
18