Testing Is_Frozen is not robust enough, so instead test that the full view
has been seen and that the Has_Completion flag is set on it.
gcc/ada/
* freeze.adb (Check_Expression_Function.Find_Constant): Make test
for deferred constants more robust.
N_Object_Declaration
and then not Is_Imported (Entity (Nod))
and then not Has_Completion (Entity (Nod))
- and then not Is_Frozen (Entity (Nod))
+ and then not (Present (Full_View (Entity (Nod)))
+ and then Has_Completion (Full_View (Entity (Nod))))
then
Error_Msg_NE
("premature use of& in call or instance", N, Entity (Nod));