This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
internal compiler error
- To: egcs-bugs at cygnus dot com
- Subject: internal compiler error
- From: "A. F. Cano" <afc at speedy dot teri dot com>
- Date: Tue, 5 Jan 1999 11:30:23 -0500 (EST)
Hi,
Got this while compiling one of the files in Bruce Watson's FIRE (FInite
Automata and Regular Expressions) Engine (available at ftp.win.tue.nl)
Script started on Tue Jan 5 11:16:32 1999
speedy:0:c++frameworks/fsa-lib/src> c++ -c -fguiding-decls sig-rfa.cpp
In file included from trans.h:12,
from rfa.h:11,
from sig-rfa.cpp:5:
tr-impl.h:27: warning: discarding `const' applied to a reference
sig-rfa.cpp:9: Internal compiler error.
sig-rfa.cpp:9: Please submit a full bug report to `egcs-bugs@cygnus.com'.
speedy:1:c++frameworks/fsa-lib/src> ^D
Script done on Tue Jan 5 11:16:56 1999
This is the file that caused it:
/* (c) Copyright 1994 by Bruce W. Watson */
// $Revision: 1.1 $
// $Date: 1994/05/02 15:59:33 $
#include "charrang.h"
#include "rfa.h"
#include "sigma.h"
// Implement the Sigma-algebra operators (Definition 4.29 of the Taxonomy).
Reg<RFA>& Reg<RFA>::epsilon() {
// This RFA may have been something in a previous life.
// Wipe out all previous info in this structure.
reincarnate();
Nullable = 1;
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::empty() {
// See epsilon case.
reincarnate();
assert( Nullable == 0 );
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::symbol( const CharRange r ) {
// See epsilon case.
reincarnate();
auto State q( Q.allocate() );
first.set_domain( Q.size() );
first.add( q );
last.set_domain( Q.size() );
last.add( q );
Qmap_inverse.set_range( Q.size() );
Qmap_inverse.add_transition( r, q );
follow.set_domain( Q.size() );
// Nothing to add to follow.
Nullable = 0;
current.set_domain( Q.size() );
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::or( const Reg<RFA>& r ) {
assert( class_invariant() );
assert( r.class_invariant() );
// All state-related stuff in r must be adjusted.
Q.incorporate( r.Q );
first.disjointing_union( r.first );
last.disjointing_union( r.last );
Qmap_inverse.disjointing_union( r.Qmap_inverse );
follow.disjointing_union( r.follow );
Nullable = Nullable || r.Nullable;
current.set_domain( Q.size() );
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::concat( const Reg<RFA>& r ) {
assert( class_invariant() );
assert( r.class_invariant() );
// See the or operator.
// All state-related stuff in r must be adjusted.
// First, incorporate the follow sets.
follow.disjointing_union( r.follow );
// Rename the incoming StateSet's first and last StateSets.
auto StateSet fi1( r.first );
fi1.st_rename( Q.size() );
auto StateSet la1( r.last );
la1.st_rename( Q.size() );
Q.incorporate( r.Q );
// Adjust last as well.
last.set_domain( Q.size() );
follow.union_cross( last, fi1 );
first.set_domain( Q.size() );
if( Nullable ) {
first.set_union( fi1 );
};
if( r.Nullable ) {
last.set_union( la1 );
} else {
last = la1;
}
Qmap_inverse.disjointing_union( r.Qmap_inverse );
Nullable = Nullable && r.Nullable;
current.set_domain( Q.size() );
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::star() {
assert( class_invariant() );
// Nothing to do to Q, first, last, Qmap_inverse.
follow.union_cross( last, first );
Nullable = 1;
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::plus() {
assert( class_invariant() );
// Don't change Q, first, last, Qmap_inverse, Nullable.
follow.union_cross( last, first );
assert( class_invariant() );
return( *this );
}
Reg<RFA>& Reg<RFA>::question() {
assert( class_invariant() );
// Don't change Q, first, last, Qmap_inverse, follow.
Nullable = 1;
assert( class_invariant() );
return( *this );
}