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]

C++ compiler assertion errors


I've been working today on attempting to build on NUE IA-64 the most
recent version of James Clark's SGML parser, SP, available in source
form at

        ftp://ftp.math.utah.edu/pub/sgml/sp-1.3.4.1.tar.gz
        http://www.math.utah.edu/pub/sgml/sp-1.3.4.1.tar.gz

That directory also contains binary distributions for versions 1.3.4
and 1.3.4.1 for 12 UNIX flavors, demonstrating that it IS possible to
build this complex package with several other C++ compilers, even
though most C++ compilers fail to handle the code.

The 1.3.4.1 builds from today were done with the gcc-2.95.3 release of
22-Mar-2001.  There is no support for IA-64 in that compiler version,
but the weekly gcc-3.0 development snapshots support IA-64 (see e.g.,
ftp://gcc.gnu.org/pub/gcc/snapshots/2001-04-23/gcc-20010423.tar.gz).
Unfortunately, they still only build successfully on 4 of my 11 local
UNIX flavors.

During this work, I've encountered fatal compiler assertion failures
on IA-64 in both g++ (version 2.9-ia64-000216) and sgiCC (version
0.01.0-13). Since the SGI Pro64 compilers use part of the gcc
components, and since it is unclear which group (GNU, HP, or SGI) is
managing the IA-64 support in gcc, I'm sending this report to all
three.  If the real maintainers will stand up, I'll direct future
reports to them only!

	% c++ -fno-implicit-templates -O2 -ansi   -I. -I./../include -I./../generic \
		-DSP_HAVE_BOOL -DSP_ANSI_CLASS_INST -DSP_MULTI_BYTE   -c parseMode.cxx
	parseMode.cxx: In method `void Parser::compileModes (const Mode *, int, const Dtd *)':
	parseMode.cxx:403: Internal compiler error in `scan_region', at except.c:2757
	Please submit a full bug report.
	See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.

	% sgiCC -ansi   -I. -I./../include -I./../generic -DSP_HAVE_BOOL \
		-DSP_ANSI_CLASS_INST -DSP_MULTI_BYTE   -c ParserApp.cxx
	### Assertion failure at line 1164 of ../../g++fe/wfe_decl.cxx:
	### Compiler Error during Writing WHIRL file phase:
	### unexpected tree code ptrmem_cst
	sgiCC INTERNAL ERROR:  /usr/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0/gfecc returned non-zero status 1

Attempts to switch compilers allow the compilations to proceed, but
unresolved references at link time prevent completion of the builds.

When I attempt a build without -DSP_ANSI_CLASS_INST, I get another
failure:

	% g++  -I. -I./../include  -DSP_HAVE_BOOL -DSP_MULTI_BYTE   -o nsgmls \
		nsgmls.o SgmlsEventHandler.o RastEventHandler.o StringSet.o \
		nsgmls_inst.o  ../lib/libsp.a -lm
	nsgmls.o: In function `XRastEventHandler::XRastEventHandler(SgmlParser *, char const *, String<unsigned short> const &, OutputCodingSystem const *, CmdLineApp *, Messenger *)':
	nsgmls.o(.text+0x25b2): undefined reference to `ErrnoMessageArg::ErrnoMessageArg(int)'
	nsgmls.o: In function `XRastEventHandler::truncateOutput(void)':
	nsgmls.o(.text+0x2d82): undefined reference to `ErrnoMessageArg::ErrnoMessageArg(int)'
	nsgmls.o(.text+0x3072): undefined reference to `ErrnoMessageArg::ErrnoMessageArg

This failure is peculiar, because the preprocessed code shows that the
missing function is indeed defined as a public inline member function
(after prettyprinting with "astyle --style=ansi"):

	class   ErrnoMessageArg : public OtherMessageArg
	{
	public:
	    virtual TypeId dynamicType() const;
	    static inline TypeId staticType()
	    {
		return TypeId(RTTI_bases_);
	    }
	protected:
	    static const void *RTTI_bases_[];
	private:
	public:
	    ErrnoMessageArg(int errnum) : errno_(errnum)
	    { }

	    MessageArg *copy() const;

	    int errnum() const;
	private:
	    int errno_;
	};

The only other large package written in C++ that I have extensive
experience with is the GNU implementation of troff, groff, which is
also written by, but not maintained by, James Clark.  The latest
version is available at

	ftp://ftp.gnu.org/pub/gnu/groff/groff-1.16.1.tar.gz

or at any of the GNU mirrors listed at

	http://www.gnu.org/order/ftp.html

I therefore tried a build of it to see if further compiler assertion
failures would turn up, and indeed, one does:

	% cd groff-1.16.1/
	% env CC=sgicc CXX=sgiCC ./configure && make all check
	% sgiCC -I. -I/nue/local/build/groff-1.16.1/src/utils/addftinfo \
		-I/nue/local/build/groff-1.16.1/src/include \
		-I/nue/local/build/groff-1.16.1/src/include -DHAVE_STDLIB_H=1 \
		-DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 \
		-DHAVE_SYS_DIR_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 \
		-DHAVE_MATH_H=1 -DRET_TYPE_SRAND_IS_VOID=1 -DHAVE_SYS_NERR=1 \
		-DHAVE_SYS_ERRLIST=1 -DHAVE_CC_LIMITS_H=1 -DRETSIGTYPE=void \
		-DHAVE_STRUCT_EXCEPTION=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 \
		-DHAVE_FMOD=1 -DHAVE_STRTOL=1 -DHAVE_GETCWD=1 -DHAVE_STRERROR=1 \
		-DHAVE_PUTENV=1 -DHAVE_RENAME=1 -DHAVE_MKSTEMP=1 -DHAVE_STRCASECMP=1 \
		-DHAVE_STRNCASECMP=1 -DHAVE_STRSEP=1 -DHAVE_STRDUP=1 \
		-DSYS_SIGLIST_DECLARED=1 -g -O1 -c addftinfo.cc

	### Assertion failure at line 1164 of ../../g++fe/wfe_decl.cxx:
	### Compiler Error during Writing WHIRL file phase:
	### unexpected tree code ptrmem_cst
	sgiCC INTERNAL ERROR:  /usr/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0/gfecc returned non-zero status 1

Notice that it occurs at the SAME location as in the compilation of
the SP file, ParserApp.cxx.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah                    Internet e-mail: beebe@math.utah.edu  -
- Department of Mathematics, 322 INSCC      beebe@acm.org  beebe@computer.org -
- 155 S 1400 E RM 233                       beebe@ieee.org                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------


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