Re: Inlining with gcc 4.x.x (Linux) ?
Peter <[email protected]> Wed, 11 Jan 2017 12:47:13 +0000
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
On 10/01/17 16:05, Prof Abimbola Olowofoyeku wrote: > snip > > Works with (32-bit) 4.1.2 (gpc version 20070904, based on gcc-4.1.2) > running on 64-bit Linux Mint 17. > > snip Thanks, that's interesting. I tried 32-bit from 4.3.6 via the -m32 switch, but still not working here. I would be very interested to see results from any 20070904 64-bit compiler based on any gcc-4.x.x Hopefully someone out there could run this test? gpc -S -O3 InlineDemo.pas grep call.*Max InlineDemo.s _______________________________________________ Gpc mailing list [email protected] https://www.g-n-u.de/mailman/listinfo/gpc
InlineDemo.pas
(text/x-pascal, 245 B)
program InlineDemo;
{$R-}
function Max (x, y: Integer): Integer; attribute (inline);
begin
if x > y then
Max := x
else
Max := y
end;
begin
WriteLn (Max (42, 17), ' ', Max (-4, -2))
end.