Description of problem: Version-Release number of selected component (if applicable): How reproducible: Try to compile the attached file. Steps to Reproduce: 1. g++ -o bug g++_bug.cpp Actual results: g++_bug.cpp: In constructor ‘Template<T>::Template() [with T = int]’: g++_bug.cpp:5: instantiated from ‘int Template<int>::member’ g++_bug.cpp:5: instantiated from ‘Template<T>::Template() [with T = int]’ g++_bug.cpp:18: instantiated from here g++_bug.cpp:5: internal compiler error: in instantiate_decl, at cp/pt.c:11947 Expected results: Compiled code. Additional info: g++ (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
Created attachment 276091 [details] The source code to reproduce the bug.
This is invalid code, and g++ 4.3 emits proper diagnostics. rh409251.C:14: error: template arguments to ‘Template<int>::member’ do not match original template ‘Template<T>::member’ rh409251.C:14: note: use template<> for an explicit specialization For 4.1/4.2 this is too low priority bug, so marking as fixed with NEXTRELEASE, as F9 is going to use F9 soon.