Eric Botcazou 2a1838cda7 [Ada] Fix recent regression on array aggregate with dynamic subtype
This prevents either a crash or an assertion failure in gigi on an array
with dynamic subtype that is wrongly flagged as static by the front-end
because of a recent improvement made in the handling of nested
aggregates.

The patch reuses the existing Static_Array_Aggregate predicate instead
of fixing the problematic test, pluging a few loopholes in the process.
The predicate is conservatively correct but should be good enough in
practice.

2018-12-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_aggr.adb (Convert_To_Positional): Use
	Static_Array_Aggregate to decide whether to set
	Compile_Time_Known_Aggregate on an already flat aggregate.
	(Expand_Array_Aggregate): Remove test on
	Compile_Time_Known_Aggregate that turns out to be dead and
	simplify.
	(Is_Static_Component): New predicate extracted from...
	(Static_Array_Aggregate): ...here.  Test neither Is_Tagged_Type
	nor Is_Controlled for the type, but test whether the component
	type has discriminants.  Use the Is_Static_Component predicate
	consistently for the positional and named cases.

gcc/testsuite/

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

From-SVN: r266755
2018-12-03 15:49:23 +00:00
2018-11-27 12:29:56 +10:30
2018-11-28 08:21:15 +00:00
2018-07-06 06:22:08 +00:00
2018-11-28 19:55:28 +05:30

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%