[Ada] Crash with Inline_Always on a function with an extended return
authorEd Schonberg <schonberg@adacore.com>
Mon, 11 Jun 2018 09:17:04 +0000 (09:17 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 11 Jun 2018 09:17:04 +0000 (09:17 +0000)
commitd1ec7de559b75ece7e49da5415426f755916d34f
tree118d9803120c5a83c6952beb75b033a4e976d226
parent75441c4a37291d5be6fb098d161a2c4a22f3741a
[Ada] Crash with Inline_Always on a function with an extended return

This patch fixes a crash on a unit with a function with the GNAT-specific
Inline_Always pragma whose body is an extended return statement, when compiling
with no optimization level specified.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* inline.adb (Expand_Inlined_Call): If no optimization level is
specified, the expansion of a call to an Inline_Always function is
fully performed in the front-end even on a target that support back-end
inlining.

gcc/testsuite/

* gnat.dg/inline_always1.adb: New testcase.

From-SVN: r261402
gcc/ada/ChangeLog
gcc/ada/inline.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/inline_always1.adb [new file with mode: 0644]