This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-1.0.1: bug handling struct in functions?



The following program causes both gcc 2.8 anf gcc egcs-2.90.23 980102 
(egcs-1.0.1 release) to declare "internal compiler error".  gcc 2.7.2.2
compiles it fine.

---bug2.cc---
template< class T >
void    sort( T* t, int n )
        {
            struct
            {
                int     operator()(T i, T j)
                        {
                            return (i < j) ? -1 : ((j < i) ? 1 : 0) ;
                        }
            } c ;
            sort(t, n, c, 0) ;
        }
----end of bug2.cc--



The system is Irix 5.3. 

%g++ -c bug2.cc
bug2.cc: In function `void sort(T *, int)':
bug2.cc:5: Internal compiler error.
bug2.cc:5: Please submit a full bug report to `egcs-bugs@cygnus.com'.

%g++ -v
Reading specs from /usr/local/egcs/lib/gcc-lib/mips-sgi-irix5.3/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]