Dear all, I would like to post a bug report for the GNU C/C++ compiler 3.3-e500. We use the compiler to generate code for a PowerPC processor. Used invokation line for the GNU C++ compiler: ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig -fmerge-templates -mmultiple -mno-string -mstrict-align -O3 -fno-exceptions -fno-rtti -fno-builtin-printf -I<some include paths> -D<some #define's> X.CPP -oX.O // file X.CPP template <typename, typename> class XXX; template <typename, bool> struct enaFunc; template <typename T_> struct enaFunc<T_,true> { typedef T_ type; }; template <typename T_> struct enaFunc<T_,false> {}; template <typename T_> struct isXXX { typedef char NO; typedef char YES[2]; template <typename U_, typename V_> static YES& check (const XXX<U_,V_>*); static NO& check (...); enum { value = (sizeof(check(static_cast<T_*>(0))) == sizeof(YES)) }; }; template <typename V_, typename U1_, typename U2_> typename enaFunc<typename V_::T_RET_TYPE, (isXXX<U1_>::value && isXXX<U2_>::value) >::type func (V_&, U1_&, U2_&); // function #1 template <typename V_, typename U1_, typename U2_> typename enaFunc<typename V_::T_RET_TYPE, (isXXX<U1_>::value && isXXX<U2_>::value) >::type func (const V_&, U1_&, U2_&); // function #2 struct YYY { typedef int T_RET_TYPE; }; void f (const XXX<int,char>& p1, const XXX<bool,int>& p2) { const YYY f = YYY(); func (f, p1, p2); // <--- line 49 } The compiler crashes with the following message: X.CPP: In function `void f(const XXX<int, char>&, const XXX<bool, int>&)': X.CPP:49: internal compiler error: Segmentation fault (Comeau online compiles the code fragment fine.) Kind regards W. Roehrl
First 3.3 is getting old and no longer being supported. Second this is a modified version of 3.3 so we don't support it.
This appears fixed since gcc 3.4.x.