Debian Codegraph @

gcc/testsuite/gnat.dg/opt60.adb

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