🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #998

Possible bug in gcc 2.2.2: compiler gets fatal signal

#998
From: Reino de Boer
Date: Wed, 30 Sep 1992 13:47
124 lines
4182 bytes
Dear reader(s),

I think I have found a bug in cc1plus.  Below you'll find:
o	config.status
	<The way we configured gcc>
o	Makefile
	<The Makefile reproducing the problem>
o	make.out
	<The result of running "make >& make.out" in the csh>
o	test.pre
	<The result of running "make pre >& test.pre" in the csh>
o	test.cc and Test.pri
	<The relevant source files>
I'm using "gcc version 2.2.2" on a "Sun ELC15" running "SunOS Release 4.1.2".
The output of `arch` in the csh gives: sun4.

BTW:	The same source, without class Test being a template class, compiles
	fine.
----------------------------- config.status -----------------------------------
#!/bin/sh
# GCC was configured as follows:
./configure sparc
---------------------------------- EOF ----------------------------------------
-------------------------------- Makefile -------------------------------------
all:
	gcc -v -xc++ -Wall -o test test.cc

pre:
	gcc -v -xc++ -Wall -E test.cc >test.pre 2>&1
---------------------------------- EOF ----------------------------------------
-------------------------------- make.out -------------------------------------
gcc -v -xc++ -Wall -o test test.cc
Reading specs from /usr/pkg/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
gcc version 2.2.2
 /usr/pkg/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Wall test.cc /usr/tmp/cca15763.i
GNU CPP version 2.2.2 (sparc)
 /usr/pkg/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cc1plus /usr/tmp/cca15763.i -fno-builtin -quiet -dumpbase test.cc -Wall -version -o /usr/tmp/cca15763.s
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
test.cc:8: #-lines for entering and leaving files don't match
test.cc:10: parse error before `}'
gcc: Internal compiler error: program cc1plus got fatal signal 11
*** Error code 1
make: Fatal error: Command failed for target `all'
----------------------------------- EOF ---------------------------------------
-------------------------------- test.pre -------------------------------------
Reading specs from /usr/pkg/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/specs
gcc version 2.2.2
 /usr/pkg/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Wall test.cc
GNU CPP version 2.2.2 (sparc)
# 1 "test.cc"
 
 
 
 
 
template <class T>
class	Test {
private:
# 1 "Test.pri" 1
 
 
 
 
 



int	i;


# 9 "test.cc" 2

};

	int
main(void)
{
	Test<int>	test;

	return	0;
}
----------------------------------- EOF ---------------------------------------
--------------------------------- test.cc -------------------------------------
//
//	test.cc:	show bug in gcc 2.2
//
//	needs:		Test.pri
//
template <class T>
class	Test {
private:
#include "Test.pri"
};

	int
main(void)
{
	Test<int>	test;

	return	0;
}
----------------------------------- EOF ---------------------------------------
-------------------------------- Test.pri -------------------------------------
//
//	Test.icc:	private parts of class Test
//			sole purpose is showing in bug in gcc
//
//
#ifndef	Test_ICC
#define	Test_ICC

int	i;

#endif
----------------------------------- EOF ---------------------------------------

Hope you can help me on this -- Reino

PS	I could send you the core dump :-))
--
Reino R. A. de Boer  
CS Dept, Faculty of Economics, Erasmus University Rotterdam
email: sysrb@cs.few.eur.nl
NIS has given `world readable' a somewhat broader meaning (Casper H.S. Dik)
Technical Details
Message-ID: <9209301147.AA15801@elc15.cs.few.eur.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.few.eur.NL!sysrb

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.few.eur.NL!sysrb
From: sysrb@cs.few.eur.NL (Reino de Boer)
Subject: Possible bug in gcc 2.2.2: compiler gets fatal signal
Message-ID: <9209301147.AA15801@elc15.cs.few.eur.nl>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 30 Sep 1992 13:47:36 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 125