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

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Wed Aug 14 09:52:00 GMT 2019


Author: pmderodat
Date: Wed Aug 14 09:52:24 2019
New Revision: 274467

URL: https://gcc.gnu.org/viewcvs?rev=274467&root=gcc&view=rev
Log:
[Ada] Incorrect error on inline protected function

This patch fixes a bug where if a protected function has a pragma
Inline, and has no local variables, and the body consists of a single
extended_return_statement, and the result type is an indefinite
composite subtype, and inlining is enabled, the compiler gives an error,
even though the program is legal.

2019-08-14  Bob Duff  <duff@adacore.com>

gcc/ada/

	* inline.adb (Check_And_Split_Unconstrained_Function): Ignore
	protected functions to get rid of spurious error. The
	transformation done by this procedure triggers legality errors
	in the generated code in this case.

gcc/testsuite/

	* gnat.dg/inline19.adb, gnat.dg/inline19.ads: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/inline19.adb
    trunk/gcc/testsuite/gnat.dg/inline19.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/inline.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list