]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Crash with Inline_Always on a function with an extended return
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2018 09:17:04 +0000 (09:17 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jun 2018 09:17:04 +0000 (09:17 +0000)
commit767fd0192cde571686cf03562498abf4c847d625
tree118d9803120c5a83c6952beb75b033a4e976d226
parent89b0f38d2275ddfd9b0c1f87894ae3954d8b3a84
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261402 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/inline.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/inline_always1.adb [new file with mode: 0644]