r266112 - in /trunk/gcc: ada/ChangeLog ada/sem_...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Wed Nov 14 11:40:00 GMT 2018
Author: pmderodat
Date: Wed Nov 14 11:40:30 2018
New Revision: 266112
URL: https://gcc.gnu.org/viewcvs?rev=266112&root=gcc&view=rev
Log:
[Ada] Fix handling of generic actuals with default expression in SPARK
Both in the GNAT frontend and in the GNATprove backend we have
several checks related to generic actuals of mode IN that rely on the
Corresponding_Generic_Association flag. However, this flag was only set
for actuals with explicit expressions from the generic instance and unset
for actuals with implicit expressions from the generic unit.
For example, the code from the added testcase was wrongly rejected with
a message that Y (which is an actual with a default expression) cannot
appear in the Initializes contract. Now this code is accepted.
2018-11-14 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* sem_ch12.adb (Instantiate_Object): Set
Corresponding_Generic_Association on generic actuals with
default expression.
* sinfo.ads (Corresponding_Generic_Association): Update comment.
gcc/testsuite/
* gnat.dg/generic_actuals.adb: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/generic_actuals.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_ch12.adb
trunk/gcc/ada/sinfo.ads
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list