[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.
From-SVN: r266112