From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: Attempting to compile some C++ code produces the following message: SERP_FISH.cc: In function `int main(int, char**)': SERP_FISH.cc:143: Internal compiler error in find_function_data, at function.c:330 lines 142 and 143 of SERP_FISH are: 142: new SERP_Filter<FishSignal,Fish_Observation,Fish_Observer> 143: (particleCount, dt/(double)s_e_e, rho, Z, (int)(log(DBL_MAX)/log(Z)), &observer); Version-Release number of selected component (if applicable): gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) How reproducible: Always Steps to Reproduce: 1. g++ -DMOVIE -DXANIM -I../methods/particle_placement -I../methods/particle_placement/rangetree -I../math/random -I../utils/misc -I../utils/parser -I../utils/structures/hash_table -I../utils/structures/list -I../utils/structures/table -I../math/algebra -I../math/coordinates -I../utils/structures/dictionary -I../utils/assert -I../graphics/animation -I../graphics/image -I../graphics/output -I../graphics/shapes -I../graphics/util -I../filters/Branching_Filter -I../filters/Discrete_Space_Filter -I../filters/Hybrid_Filter -I../interfaces/signals -I../math/domain -I../visualization/src -I../filters/Interacting_Filter -I../filters -I../math/statistics -I../math/functions -I../methods/fft -I../fish/signals -I../fish/observations -ggdb -Wall -D__PINTS_LEGACY_CODE -I. -DDEBUG -DALPHA -O3 -DJESSE SERP_FISH.cc random.o FishSignal.o PARSER.o -o JESSE_SERP_FISH -L../graphics/animation -lanimation -L../graphics/image -limage -ljpeg -L/usr/X11R6/lib -lX11 Actual Results: Failure with error as reported in description. Expected Results: It should have compiled ;) Additional info: I can't send you complete source, but if you need more information, I can send you portions of it. Let me know.
Best would be preprocessed source for this file (ie. what gcc -save-temps creates). If that is impossible to send, please try more recent gcc first (e.g. from ftp://ftp.redhat.com/pub/redhat/linux/beta/taroon/en/as/i386/RedHat/RPMS ) and if the problem persists, try to distill from SERP_FISH.ii minimal part which still reproduces the problem and you can send to us). You can mail it to me privately if you don't want anybody else to see the testcase.
I have isolated the problem. The line the error refers to in my source is calling the constructor for SERP_Filter. SERP_Filter is templated on Signal. The class used as Signal has an integer member called "D". The SERP_Filter class has an member "double estimate[Signal::D]" which is what is causing the problem. Hardcoding the array size worked around the problem. Note: I have reproduced the problem using both the taroon and cvs versions of gcc. I have e-mailed the .ii file to Jakub. If anyone else would like to work on this bug, please contact me and I will send you the code. I prefer not to publicly post it.
Just hit this bug, googled and came across this bug report. I`ve reduced my code to the smallest possible size, maybe this will help someone. $ cat test.cpp class Base { public: virtual void member(); }; template<class F> void function(F func) { class Derived: public Base { void member() { new Derived(*this); } }; new Derived; } void instantiate(){ function(0); } $ g++ -c test.cpp test.cpp: In member function `void function(F)::Derived::member() [with F = int]': test.cpp:10: instantiated from here test.cpp:7: Internal compiler error in find_function_data, at function.c:330 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Jakub didn't save the .ii file from the original problem into the PR as he ought to have done, but I can confirm that the second problem persists through to gcc 4.0. Pushed upstream to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17823