ada: Fix internal error on declare-expression in post-condition
commit9e8094a2a20607871721275a466b2524cfe98124
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 10 Mar 2023 17:05:13 +0000 (10 18:05 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:19 +0000 (25 09:44 +0200)
treeb33fa1f73693bb5d6618030464b8b5718be6c391
parent21e57cabf64612cbd3556b51054fa9c1de103faa
ada: Fix internal error on declare-expression in post-condition

It comes from an incorrect node sharing in the expanded tree.

gcc/ada/

* sem_ch3.adb (Find_Type_Of_Object): Copy the object definition when
building the subtype declaration in the case of a spec expression.
gcc/ada/sem_ch3.adb