]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Constraint error not raised in ACATS test c413007
authorJavier Miranda <miranda@adacore.com>
Tue, 17 Sep 2024 11:53:06 +0000 (11:53 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 25 Oct 2024 09:09:00 +0000 (11:09 +0200)
commit2325d653e3790f3ffda9aebf7f7a94f7aacd0bc0
treebe089c595984980945322923d798dba35303f507
parentc2673f56cc13208ee401a4feda690a0e377d55c7
ada: Constraint error not raised in ACATS test c413007

The Constraint_Error exception is not raised when a subprogram
is called using prefix notation, and the prefix of the call is
an access-to-subprogram type with a null value. This new check
is enabled by switch -gnatd_P

gcc/ada/ChangeLog:

* gen_il-fields.ads: New node field (Is_Expanded_Prefixed_Call).
* gen_il-gen-gen_nodes.adb: New semantic field for N_Function_Call
and N_Procedure_Call_Statement nodes.
* sem_ch4.adb (Complete_Object_Operation): Mark the rewritten node
with the Is_Expanded_Prefixed_Call flag.
* sem_res.adb (Check_Prefixed_Call): Code cleanup and addition of
documentation.
(Resolve_Actuals): Add a null-exclusion check on the
prefix of the call when it is an access-type.
* sinfo.ads: Adding new semantic flag (Is_Expanded_Prefixed_Call)
to N_Function_Call and N_Procedure_Call_Statement nodes.
* debug.adb: Adding documentation for switch d_P.
gcc/ada/debug.adb
gcc/ada/gen_il-fields.ads
gcc/ada/gen_il-gen-gen_nodes.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_res.adb
gcc/ada/sinfo.ads