This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug in egcs 1.0.2 (SunOS 4)
- To: <egcs-bugs at cygnus dot com>
- Subject: bug in egcs 1.0.2 (SunOS 4)
- From: Tomislav Goles <tom at ait-tech dot com>
- Date: 27 Apr 1998 14:11:27 -0400
- Organization: Advanced Investment Technology
- Reply-To: tom at ait-tech dot com
The following code triggers internal compiler error with egcs 1.0.2
on sunos 4 ('uname -a' returns 'SunOS ga010085 4.1.4 1 sun4m').
The exact same code compiles fine on hpux 10.01 (with same egcs 1.0.2).
#include <cstdarg>
template< class T > class A {};
template< class T > void foo( int c, const A< T > * p, ... )
{
typedef const A< T > * Ty;
va_list Ap;
va_start( Ap, p );
for( int i = 1; i < c; i ++ )
Ty b = static_cast< Ty >( va_arg( Ap, Ty ) ); // line 9
}
g++ -v -c -W -Wall -o foo.o foo.cpp
Reading specs from /home/am683/tgoles/tools/egcs/lib/gcc-lib/sparc-sun-sunos4.1.4/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
/home/am683/tgoles/tools/egcs/lib/gcc-lib/sparc-sun-sunos4.1.4/egcs-2.90.27/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(bsd) -D__EXCEPTIONS -W -Wall -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) foo.cpp /tmp/cca00504.ii
GNU CPP version egcs-2.90.27 980315 (egcs-1.0.2 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/home/am683/tgoles/tools/egcs/include/g++
/usr/local/include
/home/am683/tgoles/tools/egcs/sparc-sun-sunos4.1.4/include
/home/am683/tgoles/tools/egcs/lib/gcc-lib/sparc-sun-sunos4.1.4/egcs-2.90.27/include
/usr/include
End of search list.
/home/am683/tgoles/tools/egcs/lib/gcc-lib/sparc-sun-sunos4.1.4/egcs-2.90.27/cc1plus /tmp/cca00504.ii -quiet -dumpbase foo.cc -W -Wall -version -o /tmp/cca00504.s
GNU C++ version egcs-2.90.27 980315 (egcs-1.0.2 release) (sparc-sun-sunos4.1.4) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
foo.cpp: In function `void foo(int, const class A<T> * ...)':
foo.cpp:9: Internal compiler error.
foo.cpp:9: Please submit a full bug report to `egcs-bugs@cygnus.com'.
Compilation exited abnormally with code 1 at Mon Apr 27 14:10:03