]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Etype missing for raise expression
authorSteve Baird <baird@adacore.com>
Tue, 30 Jul 2024 20:48:39 +0000 (13:48 -0700)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 8 Aug 2024 14:28:29 +0000 (16:28 +0200)
commit480819c921ed656ace16c5359aaa2d9abdc73ba5
tree209e3b923d66c7ee2c8db3bb107d26de591a5834
parent85f2ffd80ed7a54f36a9bb3a91ee07b2d5e23970
ada: Etype missing for raise expression

If the primitive equality operator of the component type of an array type is
abstract, then a call to that abstract function raises Program_Error (when
such a call is legal). The FE generates a raise expression to implement this.
That raise expression is an expression so it should have a valid Etype.

gcc/ada/

* exp_ch4.adb (Build_Eq_Call): In the abstract callee case, copy
the Etype of the callee onto the Make_Raise_Program_Error result.
gcc/ada/exp_ch4.adb