The -gnatX switch enables naming a prefixed view of a subprogram with an untagged prefix. Compiling such a reference where the prefix is of a modular type could result in an internal compiler error. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch4.adb (Analyze_Selected_Component): Avoid initializing the local variable Comp if the variable is not going to be subsequently referenced. This is a correctness issue because the call to First_Entity can fail.