Eric Botcazou d71e9fb2a5 [Ada] Fix spurious error on nested instantiation with inlining
This prevents the compiler from issuing a spurious error in a convoluted
case where a child generic package declared in an enclosing parent
generic package, which contains a second child generic package, contains
an inlined subprogram and the second child generic package contains an
instantiation of the first, and the enclosing parent generic package is
instantiated with inlining across units enabled (-gnatn[12]).

The problem is that the compiler attempts to instantiate the body of the
first child generic package in the context of the enclosing parent
generic package, instead of doing it in the context of the instantiation
of the parent generic package, because of the presence of the inlined
subprogram.

2019-08-13  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_ch6.adb (Expand_Call_Helper): If back-end inlining is
	enabled, also instantiate the body of a generic unit containing
	a subprogram subject to aspect/pragma Inline_Always at
	optimization level zero.
	* sem_ch12.adb (Might_Inline_Subp): Minor tweak.
	(Analyze_Package_Instantiation): Do not instantiate the package
	body because of inlining considerations if the instantiation is
	done in a generic unit.  Move around similar condition involving
	the main unit.  Add test on Back_End_Inlining to processing for
	front-end inlining.

gcc/testsuite/

	* gnat.dg/generic_inst8.adb, gnat.dg/generic_inst8.ads,
	gnat.dg/generic_inst8_g.adb, gnat.dg/generic_inst8_g.ads: New
	testcase.

From-SVN: r274336
2019-08-13 08:06:39 +00:00
2019-08-09 23:02:08 +01:00
2019-07-15 21:17:16 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 2.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%