This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r272983 - in /trunk/gcc: ada/ChangeLog ada/inli...


Author: pmderodat
Date: Wed Jul  3 08:16:11 2019
New Revision: 272983

URL: https://gcc.gnu.org/viewcvs?rev=272983&root=gcc&view=rev
Log:
[Ada] Crash on front-end inlining of subp. with aspect specifications

This patch fixes a gap in the handling of formals when inlining a call
to a subprogram marked Inline_Always. For the inlining, the formals are
replaced by the actuals in the block constructed for inlining, The
traversal that performs this replacement does not apply to aspect
specifications that may appear in the original body, because these
aspects are only indirectly reachable from the nodes to which they
apply: a separate traversal is required to perform the replacement in
the expressions for any aspect specification present in the source.

2019-07-03  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* inline.adb (Process_Formals_In_Aspects): New procedure within
	Expand_Inlined_Call, to perform a replacement of references to
	formals that appear in aspect specifications within the body
	being inlined.

gcc/testsuite/

	* gnat.dg/inline16.adb, gnat.dg/inline16_gen.adb,
	gnat.dg/inline16_gen.ads, gnat.dg/inline16_types.ads: New
	testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/inline16.adb
    trunk/gcc/testsuite/gnat.dg/inline16_gen.adb
    trunk/gcc/testsuite/gnat.dg/inline16_gen.ads
    trunk/gcc/testsuite/gnat.dg/inline16_types.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/inline.adb
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]