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]

GCC/G++ bug - bombs on va_arg()


Hello,

Compiling some code that works with g++ 2.7.2 and Apogee, I get the following
message with egcs 1.0.3 (g++ 2.8.1 gives the same error also):

g++ -fno-implicit-templates -fpic -g -DAIPS_SOLARIS -DAIPS_LITTLE_ENDIAN -I../../tools -I../../tools/usu -I../..  -c wsim.cc -o wsim.o
g++ -fno-implicit-templates -fpic -g -DAIPS_SOLARIS -DAIPS_LITTLE_ENDIAN -I../../tools -I../../tools/usu -I../..  -c wfits.cc -o wfits.o
g++ -fno-implicit-templates -fpic -g -DAIPS_SOLARIS -DAIPS_LITTLE_ENDIAN -I../../tools -I../../tools/usu -I../..  -c wfitt.cc -o wfitt.o
wfitt.cc: In function `class PrimaryArray<TYPE> & read_copy_pa(class NoConvert<TYPE>, class PrimaryArray<FTYPE> &, int, void *)':
wfitt.cc:124: Internal compiler error.
wfitt.cc:124: Please submit a full bug report to `egcs-bugs@cygnus.com'.
gmake: *** [wfitt.o] Error 1

Line 124 of wfitt.cc is:
            dim[i] = va_arg( argp, int );

This is inside a templated function.  The va_start() is outside the function.

As I could find no description of what a full bug report is I'll do my best:
Architecture: Sun Ultrasparc
OS: Solaris 2.5.1
Compiler version: egcs 1.0.3 (had trouble compiling latest snapshot, so haven't
  tried that yet-need 'autoheader' or something)

I've prepared a stripped-down version of the body of code that allows you
to duplicate the error.  Here's how to go about doing it:

download ftp://helios.ece.usu.edu/pub1/wire/misc/wdebug.tar.gz
mkdir wsim
cd wsim
gunzip ../wdebug.tar.gz | tar xvf -
cd tools/wire
gmake (or make if that's what your gnu make is called)

We haven't installed egcs for x86 yet, but g++ 2.8.1 on Solaris 2.5.1 x86
bombs in the same place, so perhaps the compiler bug is 
architecture-independent or Solaris-specific.

Note that this bug report is going to both egcs and the mit-gnu site.

Please e-mail concerning this to me directly as I'm not subscribed to the 
mailing list.  Use either  kris@ece.usu.edu or khuber@s-vision.com.

Thanks,
Kris Huber
Sorenson Vision, Inc.



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