Internal compiler error 364
unknown
lamb@lambpc.huntsville.sparta.com
Tue Nov 4 15:10:00 GMT 1997
I ran into the compiler error above while running the egcs snapshots
from 10/09 and confirmed it with the 1997-10-31 snapshot. (In the
meantime, thanks for taking care of all the iostream header error
messages!) I managed to isolate the cause into a short test program
included below. The root cause seems to be trying to set up an STL
vector of references.
The compiler transcript:
lambl:16:55:50 ~/src/mesv2 $ eggs -c fubar.cpp
fubar.cpp: In function `int main(int, char **)':
fubar.cpp:39: warning: initialization of non-const reference `class MESSAGE &' from rvalue `MESSAGE'
/home/lambl/bin/include/g++/vector.h: In method `void vector<MESSAGE &,__default_alloc_template<false,0> >::push_back(class MESSAGE &const &)':
/home/lambl/bin/include/g++/vector.h:138: Internal compiler error 364.
/home/lambl/bin/include/g++/vector.h:138: Please submit a full bug report to `egcs-bugs@cygnus.com'.
lambl:16:58:12 ~/src/mesv2 $
The test file:
/*
* Test program to isolate internal compiler error.
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <iostream.h>
#include <fstream.h>
#include <ctype.h>
#include <vector.h>
class MESSAGE {
public:
int MessNum;
int Size;
// constructors
MESSAGE(int MN, int Sz);
MESSAGE();
};
// Make a message if message rule is triggered by event.
// Returns either a MESSAGE * (if successful) or NULL (if not).
MESSAGE *MakMessage(int ev, int sz);
int main(int argc, char **argv) {
vector<MESSAGE &> Messages;
vector<MESSAGE &>::iterator itMess;
int MN, SZ;
MN=SZ=1;
MESSAGE *Messg=MakMessage(MN,SZ);
if (Messg) Messages.push_back(*Messg);
}
Please let me know if I can help isolate this any further.
Pat Lamb
More information about the Gcc-bugs
mailing list