[Ada] Lift old restriction on inlining
Eric Botcazou
ebotcazou@adacore.com
Sat Mar 26 09:43:00 GMT 2011
This change lifts a restriction whereby calls to subprograms without a previous
spec declared in the same unit weren't subject to inter-unit inlining. The
restriction is useless now thanks to the unit-at-a-time mode of the back-end.
Tested on i586-suse-linux, applied on the mainline.
2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
subprograms without a previous spec declared in the same unit.
* gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
subprograms at the end of the unit instead of at the beginning.
* gcc-interface/utils.c (create_subprog_decl): Check that the entity
isn't public for the special handling of non-inline functions nested
inside inline external functions.
2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt15.adb: New test.
* gnat.dg/opt15_pkg.ad[sb]: New helper.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 5101 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110326/973ad53e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt15_pkg.adb
Type: text/x-adasrc
Size: 184 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110326/973ad53e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt15.adb
Type: text/x-adasrc
Size: 271 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110326/973ad53e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt15_pkg.ads
Type: text/x-adasrc
Size: 98 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110326/973ad53e/attachment-0003.bin>
More information about the Gcc-patches
mailing list