In some cases when a legal allocator which defines a new subtype for the allocated object occurs as part of a record component constraint expression, the compiler would incorrectly reject the allocator. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb (Analyze_Allocator): After calling Insert_Action to insert a subtype declaration associated with an allocator, the subtype declaration will usually be analyzed. But not always. Add an explicit call to Preanalyze to cope with the unusual case. The subtype declaration must be at least preanalyzed before the call to Sem_Ch3.Process_Subtype a little while later, during which we analyze an identifier that refers to the subtype.