diff options
author | Gary Dismukes <dismukes@adacore.com> | 2020-05-17 17:57:05 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-08 10:55:50 -0400 |
commit | 85f6d7e2d277bc7d409302673892ff2ca2c45535 (patch) | |
tree | 4eb82ce8ad1f9de973ea4f47232f4732a22deb34 /gcc/ada/sinfo.adb | |
parent | 0f2d27e5fe82467329e0bbe8295bb4857b5da53c (diff) | |
download | gcc-85f6d7e2d277bc7d409302673892ff2ca2c45535.zip gcc-85f6d7e2d277bc7d409302673892ff2ca2c45535.tar.gz gcc-85f6d7e2d277bc7d409302673892ff2ca2c45535.tar.bz2 |
[Ada] Static expression function problems with -gnatc and -gnatd.F (SPARK mode)
gcc/ada/
* exp_ch6.adb (Expand_Simple_Function_Return): Remove ugly code
that was copying the return expression, resetting Analyzed
flags, etc. for the return expression of static expression
functions.
* inline.adb (Inline_Static_Expression_Function_Call): Set the
Parent of the copied expression to that of the call. This avoids
a blowup in Insert_Actions when GNATprove_Mode is set and there
are nested SEF calls. Add ??? comment.
* sem_ch6.adb (Analyze_Expression_Function): In the case of a
static expression function, create a new copy of the expression
and replace the function's expression with the copy; the
original expression is used in the expression function's body
and will be analyzed and rewritten, and we need to save a clean
copy for later use in processing static calls to the function.
This allows removing the kludgy code that was in
Expand_Simple_Function_Return.
* sem_eval.adb (Eval_Qualified_Expression): Return immediately
if any errors have been posted on the qualified expression, to
avoid blowups when GNATprove_Mode is enabled (or with -gnatd.F),
since illegal static expressions are handled differently in that
case and attempting to fold such expressions would fail.
Diffstat (limited to 'gcc/ada/sinfo.adb')
0 files changed, 0 insertions, 0 deletions