ada: Fix missing error on function call returning incomplete view
commit63a4bcf377ae6594ca84b5dac102ab9f536fc068
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 12 May 2023 18:20:16 +0000 (12 20:20 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 15 Jun 2023 07:59:34 +0000 (15 09:59 +0200)
treee60ea5127ca2be7ad7ff257acce3110c12fcf840
parentfda87a4441c447e9c410fb465bdb012c84d610db
ada: Fix missing error on function call returning incomplete view

Testing for the presence of Non_Limited_View is not sufficient to detect
whether the nonlimited view has been analyzed because Build_Limited_Views
always sets the field on the limited view.  Instead the discriminant is
whether this nonlimited view is itself an incomplete type.

gcc/ada/

* sem_ch4.adb (Analyze_Call): Adjust the test to detect the presence
of an incomplete view of a type on a function call.
gcc/ada/sem_ch4.adb