[Ada] Compiler abort on call to expr. function for default discriminant
If a discriminant specification has a default that is a call to an
expression function, that function has to be frozen at the point of a
call to the initialization procedure for an object of the record type,
even though the call does not appear to come from source.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_res.adb (Resolve_Call): Force the freezing of an
expression function that is called to provide a default value
for a defaulted discriminant in an object initialization.
gcc/testsuite/
* gnat.dg/expr_func5.adb: New testcase.
From-SVN: r263710