r273112 - in /trunk/gcc: ada/ChangeLog ada/sem_...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Fri Jul 5 07:02:00 GMT 2019
Author: pmderodat
Date: Fri Jul 5 07:02:32 2019
New Revision: 273112
URL: https://gcc.gnu.org/viewcvs?rev=273112&root=gcc&view=rev
Log:
[Ada] Spurious error on aggregate with choice that is predicted subtype
This patch fixes a spurious error on a record aggregate for a variant
record when a choice in the aggregate is given by a subtype with a
static predicate. The same expansion mechanism for such a variant, used
in case statements, must be used here as well.
2019-07-05 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope
is a loop, continue climbing the scope stack to find the
enclosing subprogram.
(Gather_Components): Handle properly a choice in a record
aggregate that is given by a subtype with a static predicate.
gcc/testsuite/
* gnat.dg/aggr25.adb, gnat.dg/aggr25.ads: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/aggr25.adb
trunk/gcc/testsuite/gnat.dg/aggr25.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_util.adb
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list