aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppbuiltin.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-10-25 21:16:14 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-11-12 14:05:45 +0100
commit2630b23534b8ccca71b149c8fe2dbd9aaa288c23 (patch)
tree1886e0aa231899fa82946923cdd0e7f2a56b9bce /gcc/cppbuiltin.cc
parentbd525f07535cb1a144e39cbb5c9b33e845d19e87 (diff)
downloadgcc-2630b23534b8ccca71b149c8fe2dbd9aaa288c23.zip
gcc-2630b23534b8ccca71b149c8fe2dbd9aaa288c23.tar.gz
gcc-2630b23534b8ccca71b149c8fe2dbd9aaa288c23.tar.bz2
ada: Get rid of N_Unchecked_Expression node
This node is used in a single place in the front-end: it wraps the newly built N_Indexed_Component nodes on the left-hand side of assignments generated to elaborate array aggregates, and its effect is to disable range checks for the expressions of these nodes. Most of the code in the front-end does not expect to encounter it at all, which leads to weird effects when this actually happens after changes are made to the processing of array aggregates. This change replaces the node by the Kill_Range_Check flag already present on N_Unchecked_Type_Conversion, but with a slightly adjusted semantics. gcc/ada/ChangeLog: * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Do not call Checks_Off on the newly built N_Indexed_Component node but instead set Kill_Range_Check on it. * exp_ch4.ads (Expand_N_Unchecked_Expression): Delete. * exp_ch4.adb (Expand_N_Indexed_Component): Remove handling of N_Unchecked_Expression. (Expand_N_Unchecked_Expression): Delete. (Expand_N_Unchecked_Type_Conversion): Propagate the Assignment_OK flag and rewrite the node manually. * exp_util.adb (Insert_Actions): Remove handling of N_Unchecked_Expression. (Side_Effect_Free): Likewise. * expander.adb (Expand): Likewise. * gen_il-gen-gen_nodes.adb (N_Indexed_Component): Add flag Kill_Range_Check for the purpose of semantics. (N_Unchecked_Expression): Delete. * gen_il-internals.ads (Type_Frequency): Remove entry for N_Unchecked_Expression. * gen_il-types.ads (Opt_Type_Enum): Remove N_Unchecked_Expression. * pprint.adb (Expression_Image): Remove handling of N_Unchecked_Expression. * sem.adb (Analyze): Likewise. * sem_ch4.ads (Analyze_Unchecked_Expression): Delete. * sem_ch4.adb (Analyze_Unchecked_Expression): Likewise. * sem_res.adb (Resolve_Unchecked_Expression): Likewise. (Resolve): Remove handling of N_Unchecked_Expression. (Resolve_Indexed_Component): Do not call Apply_Scalar_Range_Check on the expressions if Kill_Range_Check is set on the node. * sem_util.adb (Is_Non_Preelaborable_Construct): Remove handling of N_Unchecked_Expression. * sinfo.ads (Kill_Range_Check): Document it for N_Indexed_Component. (Unchecked Expression): Delete specification. * sprint.adb (Sprint_Node_Actual): Remove handling of N_Unchecked_Expression. * tbuild.ads (Checks_Off): Delete. * tbuild.adb (Checks_Off): Likewise.
Diffstat (limited to 'gcc/cppbuiltin.cc')
0 files changed, 0 insertions, 0 deletions