]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: No need to follow New_Occurrence_Of with Set_Etype
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 23 Feb 2024 12:57:27 +0000 (13:57 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 16 May 2024 08:49:31 +0000 (10:49 +0200)
commitf5c78702f9436bfa5a0cf1f87b6004ead79c5892
tree5db29ad64d92d7ca166f195d132a9cc4ce9029d3
parent7d2a5dbbfed311b9d13e5772dbc86f525adde3e9
ada: No need to follow New_Occurrence_Of with Set_Etype

Routine New_Occurrence_Of itself sets the Etype of its result; there is
no need to set it explicitly afterwards.

Code cleanup related to fix for attribute 'Old; semantics is unaffected.

gcc/ada/

* exp_ch13.adb (Expand_N_Free_Statement): After analysis, the
new temporary has the type of its Object_Definition and the new
occurrence of this temporary has this type as well; simplify.
* sem_util.adb
(Indirect_Temp_Value): Remove redundant call to Set_Etype;
simplify.
(Is_Access_Type_For_Indirect_Temp): Add missing body header.
gcc/ada/exp_ch13.adb
gcc/ada/sem_util.adb