When implementing structural subprogram variants we ignored them in expansion of the pragma itself, but not in expansion of a recursive subprogram call. Now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb (Check_Subprogram_Variant): Ignore structural variants.