Description of Problem: g++ and g++3 reports: Internal compiler error in find_function_data, at function.c:328 How Reproducible: Every time Steps to Reproduce: 1. compile the code with g++ or g++3 Actual Results: ~/cache/src/funnelHeap> g++3 error.cpp error.cpp: In constructor `priority_queue<T, Compare>::priority_queue() [with T = int, Compare = int]': error.cpp:21: instantiated from `priority_queue<T, Compare>::priority_queue() [with T = int, Compare = int]' error.cpp:26: instantiated from here error.cpp:21: Internal compiler error in find_function_data, at function.c:328 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. ~/cache/src/funnelHeap> Expected Results: Compilation of the file. Additional Information: The code that gives the problem is: int K[1] = {8}; template<class T, class Compare> class Buf { public: Buf(T* start_) { } }; template<class T, class Compare = int> class priority_queue { public: T B[K[0]]; // if K[0] is replaced by its value 8, the error is removed. Buf<T, Compare>* I; // if I is defined localy in the constructor, the error is removed. priority_queue() { I = new Buf<T, Compare>(B); } }; int main() { priority_queue<int> test; }
Created attachment 61604 [details] Sample code that results in the error.
Verified works ok in g++ 2.3 / 8.0