[Ada] Compiler abort on call to expr. function for default discriminant
Pierre-Marie de Rodat
derodat@adacore.com
Tue Aug 21 15:02:00 GMT 2018
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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1502 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180821/ca04d891/attachment.bin>
More information about the Gcc-patches
mailing list