This is the mail archive of the 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]

Internal compliler error in egcs-ss-980308

>>>>> "Wimmer" == Wimmer Andreas <> writes:

    Wimmer> Hi Folks, When switching to egcs-ss-980308 I got an
    Wimmer> internal compler error which I could reduce to the
    Wimmer> following small test case:

    Wimmer> -------------------------------------------------------
    Wimmer> #include <list>

    Wimmer> template <class T > class JRRangeIterator { };

    Wimmer> template <class T> class JRRange { typedef
    Wimmer> JRRangeIterator<T> const_iterator; };

    Wimmer> template < class T > class JRRegionLine { public: typedef
    Wimmer> list< JRRange<T> >::const_reverse_iterator
    Wimmer> const_reverse_iterator;

    Wimmer>     JRRegionLine() {}; };

    Wimmer> main(int argc, char ** argv) { JRRegionLine<int>
    Wimmer> oDefRegionLine; // line 25 }
    Wimmer> ------------------------------------------------------------

The reason for this crash is a bug in the `implicit typename
extension'.  If you say:

  typedef typename list< JRRange<T> >::const_reverse_iterator ...

as required by the standard all is OK.  Jason, you might want to take
a look at this bug; I think it may show up rather often.  At this
point in make_implicit_typename:

	retval = make_typename_type (DECL_CONTEXT (t), DECL_NAME (t));
t is list<T, Alloc>::const_iterator, so we get a typename type for the
list<T, Alloc>, rather than list < JRRange<T> >.

    Wimmer> Compiler run: eg++ -Vegcs-2.91.13 -Wall test1.cpp -o test1
    Wimmer> test1.cpp:25: Internal compiler error.  test1.cpp:25:
    Wimmer> Please submit a full bug report to `'.
    Wimmer> make: *** [test1] Error 1 make: Target `all' not remade
    Wimmer> because of errors.

    Wimmer> The error only occured with the latest snapshot (I checked
    Wimmer> with almost all previous snapshots), but I did not check
    Wimmer> with egcs-1.0 or 1.01

    Wimmer> I compiled egcs (like all snapshots before) with
    Wimmer> --enable-shared and --enable-threads

    Wimmer> Output from config.guess: i686-pc-linux-gnulibc1

Mark Mitchell
Stanford University

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