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]

[Fwd: echoPrnt.H: g++: Internal compiler error: program cc1plus got fatal signal 11]






Hi,

Here is a bug report.
        Thanks in advance,
        Alex


//#########################################################
//------------------- C++ code : BEGIN -------------------
Plese see attachment files (3 files)

//------------------- C++ code : END ----------------------

//#########################################################
//------------------- Compilation Results : BEGIN ---------
%g++ -v echoMain.C echoPrnt.C


Reading specs from
/tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
 /tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/cpp -lang-c++
-v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91
-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__
-D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix)
-Asystem(svr4) -D__EXCEPTIONS -D__GCC_NEW_VARARGS__ -Acpu(sparc)
-Amachine(sparc) echoMain.C /var/tmp/cckDA2di.ii
GNU CPP version egcs-2.91.57 19980901 (egcs-1.1 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 /tools/EGCS/include/g++
 /tools/EGCS/sparc-sun-solaris2.6/include
 /tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/include
 /usr/include
End of search list.
 /tools/EGCS/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.57/cc1plus
/var/tmp/cckDA2di.ii -quiet -dumpbase echoMain.cc -version -o
/var/tmp/ccrfNyBT.s
GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release)
(sparc-sun-solaris2.6) compiled by GNU C version egcs-2.91.57 19980901
(egcs-1.1 release).
echoPrnt.H: g++: Internal compiler error: program cc1plus got fatal
signal 11

//------------------- Compilation Results : END -----------

//#########################################################
//------------------- Compiler & System  ------------------

g++ -v     : gcc version egcs-2.91.57 19980901
             (egcs-1.1 release)

uname -a   : SunOS <nodename> 5.6 Generic_105181-09
             sun4m sparc SUNW,SPARCstation-5

//---------------------------------------------------------

//#########################################################


//###########
// echoPrnt.H
//###########

#ifndef echoPrnt_H
#define echoPrnt_H

#include <string>
#include <iostream.h>
#include <fstream.h>
#include <assert.h>


#define DEFAULT_OutFileName	"Default.out"

class echoPrnt
{

	private:
		ofstream OutFile;

	public:
		echoPrnt () 
		{
			assert (!OutFile.is_open ());
  			OutFile.open(DEFAULT_OutFileName);
			if (!OutFile.is_open ())
			{
				cout << "Cannot open " 
				     << DEFAULT_OutFileName 
				     << endl;
				exit (1);
			}
		}

 		void setFileName (char const * const fn)
 		{
			OutFile.close ();
			assert (!OutFile.is_open ());
  			OutFile.open(fn);
			if (!OutFile.is_open ())
			{
				cout << "Cannot open " 
				     << fn 
				     << endl;
				exit (1);
			}
 		};

		~echoPrnt()
 		{
			OutFile.close();
			assert (!OutFile.is_open ());
		};

		template <class T> echoPrnt& operator<< (const T v)
		{
			cout << v;
			OutFile << v;
			return *this;
		}

		template <class T> echoPrnt& operator<< (const T& v)
		{
			cout << v;
			OutFile << v;
			return *this;
		}

};

extern	echoPrnt	tout;	

#endif

//###########
// echoPrnt.C
//###########

#include "echoPrnt.H"
echoPrnt	tout;	

//###########
// echoMain.C
//###########

#include "echoPrnt.H"
main()
{
string	s1 = "AAAAA";
char*	s2 = "BBBBB";
char	s3 [] = "CCCCC";
int	i1 = 111;		

        tout << s1 << endl;
        tout << s2 << endl;
        tout << s3 << endl;
        tout << "DDDDD" << endl;
        tout << i1 << endl;
        tout << 222 << endl;

	tout.setFileName ("AAA.out");

        tout << "HELLO" << endl;
        tout << 33333 << endl;

        return 0;
}




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