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]
Other format: [Raw text]

bug in g++


Dear Sir,

Here is what seams to be a bug in g++

Identical on two machines :

1) Celeron 1200Mhz, RAM 256 Mo, Linux Mandrake 9.0

[simon at altig bug]$ gcc -c bug.cc
bug.cc: In function `void func(S_Token*)':
bug.cc:8: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://qa.mandrakesoft.com/> for instructions.

simon at altig bug]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enablee-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)


2) Pentium 3, 350MHz, RAM 128 Mo, Linux Redhat 8.0

[visit1 at fermi bug]$ gcc -c bug.cc &
[1] 18464
[visit1 at fermi bug]$ bug.cc: In function `void func(S_Token*)':
bug.cc:8: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

[1]+  Exit 1                  gcc -c bug.cc
visit1 at fermi bug]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --hoost=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

/*Here starts the source file bug.cc
which contains an obvious nesting mistake line 8
Note that the suffix .cc seems here to be important.
These comments are not part of the source file (for lines counting) which starts with typedef struct...*/

typedef struct S_Token
	{
	char token ;
	} ;

void func(S_Token *ptr_token)
	{
	if('E' == ptr_token[0].token) && ('F' == ptr_token[1].token))
		{
		}
	return ;
	}

/* Here ends the source file bug.cc*/

The souce file being so short, I see no point to give more details.
Sincerely yours,

Jacques Simon
Département de Mathématiques
UFR Sciences et Techniques
9, avenue Savary
B.P. 47 870
21078 Dijon Cedex
e-mail  simon at u-bourgogne dot fr
Burgundy Editor  http://www.u-bourgogne.fr/monge/j.simon


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