inline16.adb
592 Bytes
-
[Ada] Crash on front-end inlining of subp. with aspect specifications · 5460389b
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. From-SVN: r272983
Ed Schonberg committed