[Ada] Spurious error when using current instance of type
authorJustin Squirek <squirek@adacore.com>
Tue, 30 Nov 2021 23:40:40 +0000 (23:40 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 6 Jan 2022 17:11:34 +0000 (17:11 +0000)
commit1f26ff11b688e3cec00da85b13f6f33e23fc7410
treeaef0ab468460253d75f67e5d16c5bfbbfb8f3ce7
parent0590ed7248a46c06c9f0d166af7eb8c9bb046a66
[Ada] Spurious error when using current instance of type

gcc/ada/

* exp_ch3.adb (Build_Assignment): Replace current instance of
type with Init_Proc formal.
* sem_attr.adb (OK_Self_Reference): Handle recognition of
Current_Instance to detect certain expansion.
* sem_ch4.adb (Analyze_One_Call): Set actual's type when the
actual in question is a current instance and its corresponding
formal is an incomplete type.
* sem_util.adb (Is_Current_Instance): Add check for incomplete
views and add comment.
gcc/ada/exp_ch3.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_util.adb