http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51107
--- Comment #3 from Ed Smith-Rowland <3dw4rd at verizon dot net> 2011-11-14 03:42:45 UTC --- DECL_USE_TEMPLATE (decl) == 0 for template specializations. So DECL_TEMPLATE_SPECIALIZATION (current_function_decl) is false. In fact current_function_decl is null so the second construct must be shielded.