------- Comment #7 from ron_hylton at hotmail dot com  2005-11-05 18:49 -------
(In reply to comment #5)
> I tried out a few cross compilers for i686-pc-cygwin over the last few
> months.  The code compiled cleanly on 20040607.  Sometime between then
> and 20040709 it started failing with a different ICE from what it gets now.
> For awhile (at least from 20040921-20051127) it got only:
> 
> C:/rah/Vc/CppLib/RefCntUtil.h:119: error: declaration of
> `RefCntUtil::ucPtr<T>::operator T*() const'
> C:/rah/Vc/CppLib/RefCntUtil.h:101: error: conflicts with previous declaration
> `RefCntUtil::ucPtr<T>::operator X*() const'
> 
> That error went away.  The current ICE and several of the other errors started
> sometime between 20050227-20050404.  Here's a testcase for one of them:
> 
> class CloneableObject
> {
>   friend class CloneWalker;
> public:
>   virtual void WalkClone(CloneWalker&) const = 0;
> };
> 
> class CloneWalker
> {
>   CloneWalker(int) {}
>   CloneWalker(void) {}
> };
> 
> It fails on powerpc-linux with "error: ‘CloneWalker’ has not been declared",
> the first error that the large testcase gets, not the one that leads to
> the ICE.
> 

There is a missing forward declaration for class CloneWalker in the supplied
test case (although I believe older versions of gcc did not require this).  I
have posted a revised test case where I added the declaration and fixed another
problem.  With this test case and gcc 4.1.0,

gcc -c  compiles
gcc -c -O2 gives a segmentation fault

If the forward declaration of class CloneWalker at line 50437 is commented out,
gcc -c (4.1.0) gives a number of error messages before 

C:/rah/Vc/CppLib/ADI2FwdStartSolver.h:148: internal compiler error: in
adjust_re
sult_of_qualified_name_lookup, at cp/search.c:1488


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24605

Reply via email to