Internal compiler error : In instantiation of `FFF<int,char,float>

Alex Vinokur alexander.vinokur@telrad.co.il
Sun Jul 4 21:49:00 GMT 1999


Hi,

Here is a bug report.
        Thanks in advance,
        Alex



//#########################################################
//------------------- C++ code : BEGIN -------------------

//---------------------------------------------
template <typename T1, typename T2, typename T3>
class FFF;


//---------------------------------------------
class AAA {public : AAA (); };

//---------------------------------------------
template <typename T1> class BBB1 {public : BBB1 (); };
template <typename T1> class BBB2 {public : BBB2 (); };
template <typename T1> class BBB3 {public : BBB3 (); };

//---------------------------------------------
template <typename T1, typename T2> class CCC1 {};
template <typename T1, typename T2> class CCC2 {};
template <typename T1, typename T2> class CCC3 {};
template <typename T1, typename T2> class CCC4 {};
template <typename T1, typename T2> class CCC5 {};

//---------------------------------------------
template <typename T1, typename T2, typename T3> class DDD1 {};
template <typename T1, typename T2, typename T3> class DDD2 {};
template <typename T1, typename T2, typename T3> class DDD3 {};
template <typename T1, typename T2, typename T3> class DDD4 {};
template <typename T1, typename T2, typename T3> class DDD5 {};

//---------------------------------------------
template <typename T1, typename T2, typename T3, typename T4> class EEE1

{};

//---------------------------------------------
//---------------------------------------------
//---------------------------------------------
template <typename T1, typename T2, typename T3>
class FFF
{
//-----
friend class AAA;

//-----
friend class BBB1<int>;
friend class BBB2<T1>;
template <typename S1> friend class BBB3;

//-----
friend class CCC1<int, float>;
friend class CCC2<int, T2>;
friend class CCC2<T1, int>;
friend class CCC3<T1, T2>;
friend class CCC3<T1, T3>;
friend class CCC3<T2, T3>;
friend class CCC3<T3, T2>;
template <typename S2> friend class CCC4<int, S2>;
template <typename S1, typename S2> friend class CCC;

//-----
friend class DDD1<int, char, float>;
friend class DDD2<int, T2, float>;
friend class DDD2<int, T3, float>;
friend class DDD3<T1, T2, T3>;
friend class DDD3<T1, T3, T2>;
template <typename S1, typename S2> friend class DDD4<T1, S2, S1>;

template <typename S1, typename S2, typename S3>
friend class DDD5<S3, S1, S2>;

//-----
template <typename S> friend class EEE1<T1, T2, S, T3>;

        private :
                FFF (T1 t1) {}

        public :
                ~FFF () {}
};

//---------------------------------------------
AAA::AAA ()
{
        FFF<int, char, float> (5);      // Line#82
}

template <typename T1>
BBB1<T1>::BBB1 ()
{
        FFF<T1, double, float> (T1 ());
};

template <typename T1>
BBB2<T1>::BBB2 ()
{
        FFF<T1, double, float> (T1 ());
};


class YYY {};

template <typename T1>
BBB3<T1>::BBB3 ()
{
        FFF<YYY, double, float> (YYY ());
};


class XXX {};
int main ()
{
AAA a;

BBB1<int>       b1;

BBB2<int>       b2;
BBB2<char>      b3;
BBB2<XXX>       b4;

BBB3<XXX>       b5;
        return 0;
}



//------------------- C++ code : END ----------------------

//#########################################################
//------------------- Compilation Results : BEGIN ---------
%g++ -v jjj.C


Reading specs from
/tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
 /tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/cpp -lang-c++
-v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91
-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__
-D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix)
-Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__ -Acpu(sparc)
-Amachine(sparc) jjj.C /var/tmp/ccmaOlHI.ii
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /tools/EGCS/include/g++
 /tools/EGCS/sparc-sun-solaris2.6/include
 /tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/include
 /usr/include
End of search list.
 /tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/cc1plus
/var/tmp/ccmaOlHI.ii -quiet -dumpbase jjj.cc -version -o
/var/tmp/cckHwtEv.s
GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release)
(sparc-sun-solaris2.6) compiled by GNU C version egcs-2.91.57 19980901
(egcs-1.1 release).
jjj.C: In instantiation of `FFF<int,char,float>':
jjj.C:82:   instantiated from here
jjj.C:82: Internal compiler error.
jjj.C:82: Please submit a full bug report to `egcs-bugs@cygnus.com'.

//------------------- Compilation Results : END -----------

//#########################################################
//------------------- Compiler & System  ------------------

g++ -v     : gcc version egcs-2.91.57 19980901
             (egcs-1.1 release)

uname -a   : SunOS <nodename> 5.6 Generic_105181-09
             sun4m sparc SUNW,SPARCstation-5

//---------------------------------------------------------

//#########################################################





More information about the Gcc-bugs mailing list