This patch corrects issues in the compiler whereby default initializing a protected type component of an access type containing controlled parts with an allocator causes a crash at compile-time at the point of an object declaration of such protected type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch7.adb (Make_Final_Call): Detect expanded protected types and use original protected type in order to calculate appropriate finalization routine.