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]

gcc-snapshot 2000-03-16 : internal compiler error


Dear,

the gcc-snapshot from 2000-03-16  (2.96 experimental) produces a
internal error.
I have downloaded the snapshot as rpm-packages from   
http://www.codesourcery.com/gcc-snapshots.html.

Command line is this : "gcc -Wall linkedlist1.cpp".
Error message is     : "Internal compiler error in 'expand-expr', at
expr.c:5917  Please submit a full bug report..."

The full compiler output, the source file and preprocessed sourcecode is
attached with this message.
I hope this is the right place for bug reports with a snapshot release
of gcc.
bash-2.03# gcc -Wall -o linkedlist1.bin linkedlist1.cpp
linkedlist1.cpp:20: parse error before `item'
linkedlist1.cpp:25: `item' was not declared in this scope
linkedlist1.cpp:25: parse error before `;'
linkedlist1.cpp:27: `item' was not declared in this scope
linkedlist1.cpp:27: parse error before `;'
linkedlist1.cpp:29: `item' was not declared in this scope
linkedlist1.cpp:29: parse error before `;'
linkedlist1.cpp: In function `int main ()':
linkedlist1.cpp:38: Internal compiler error in `expand_expr', at
linkedlist1.cpp:38: expr.c:5917
linkedlist1.cpp:38: Please submit a full bug report.
linkedlist1.cpp:38: See <URL:http://www.gnu.org/software/gcc/bugs.html>
linkedlist1.cpp:38: for instructions.
bash-2.03#



bash-2.03# gcc -v --save-temps -Wall linkedlist1.cpp
Reading specs from /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.96/specs
gcc version 2.96 20000316 (experimental)
 /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.96/cpp -lang-c++ -v -iprefix /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.96/ -D__GNUC__=2 -D__GNUG__=2-D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__cplusplus -D__ELF__ -Dunix -Dlin
ux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEP
TIONS -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386
__ linkedlist1.cpp linkedlist1.ii
GNU CPP version 2.96 20000316 (experimental) (cpplib)
 (i386 Linux/ELF)
ignoring nonexistent directory `/tmp/gcc-20000316-root/usr/local/include/g++-3'ignoring nonexistent directory `/tmp/gcc-20000316-root/usr/local/lib/gcc-lib/i38
6-pc-linux-gnu/2.96/include'
ignoring nonexistent directory `/tmp/gcc-20000316-root/usr/local/i386-pc-linux-g
 /usr/local/lib/gcc-lib/i386-pc-linux-gnu/2.96/include
 /usr/local/i386-pc-linux-gnu/include
 /usr/local/include
 /usr/include
End of search list.
 /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.96/cc1plus linkedlist1.ii -quiet -dumpbase linkedlist1.cc -Wall -version -o linkedlist1.s
GNU C++ version 2.96 20000316 (experimental) (i386-pc-linux-gnu) compiled by GNU C version 2.96 20000316 (experimental).
linkedlist1.cpp:20: parse error before `item'
linkedlist1.cpp:25: `item' was not declared in this scope
linkedlist1.cpp:25: parse error before `;'
linkedlist1.cpp:27: `item' was not declared in this scope
linkedlist1.cpp:27: parse error before `;'
linkedlist1.cpp:29: `item' was not declared in this scope
linkedlist1.cpp:29: parse error before `;'
linkedlist1.cpp: In function `int main ()':
linkedlist1.cpp:38: Internal compiler error in `expand_expr', at
linkedlist1.cpp:38: expr.c:5917
linkedlist1.cpp:38: Please submit a full bug report.
linkedlist1.cpp:38: See <URL:http://www.gnu.org/software/gcc/bugs.html>
linkedlist1.cpp:38: for instructions.
bash-2.03#
#include "iostream.h"
#include "string.h"
#include "alloc.h"

class listitem
{
public:
char *field_a,*field_b,*field_c;
int field_d;

listitem *next_item;

listitem(void);
listitem(const listitem& item);
//listitem& operator = (const listitem&);
};

listitem::listitem(void) {}

listitem::listitem(const &litstitem item)
{
this->field_a = (char *) malloc(strlen(item.field_a));
this->field_b = (char *) malloc(strlen(item.field_b));
this->field_c = (char *) malloc(strlen(item.field_c));
for(long c = 0; c < strlen(item.field_a); ++c)
{this->field_a[c] = item.field_a[c];}
for(long c = 0; c < strlen(item.field_b); ++c)
{this->field_b[c] = item.field_b[c];}
for(long c = 0; c < strlen(item.field_c); ++c)
{this->field_c[c] = item.field_c[c];}
this->field_d = item.field_d;
this->next_item = NULL;
}


int main()
{
listitem abc;
abc.field_d = 333;
}

linkedlist1.ii.gz


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