Internal compiler error 373
Alexander Vrchoticky
avrchoti@frequentis.com
Thu Feb 10 08:45:00 GMT 2000
Hello,
we've managed to trigger an "Internal compiler error 373" in egcs.
Criticality is low, as the error is triggered by invalid input
that is easy to fix -- but it took a while of staring at the code
to see the offending typo.
Here come the details:
Command line:
-------------
avrchoti@frqmei5ux:(186)% egcc -v --save-temps foo.cpp
Output:
-------
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ foo.cpp foo.ii
GNU CPP version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++-2
/usr/local/include
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/cc1plus foo.ii -quiet -dumpbase foo.cc -version -o foo.s
GNU C++ version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release) (i486-linux) compiled by GNU C version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release).
foo.cpp: In function `int main()':
foo.cpp:21: Internal compiler error 373.
foo.cpp:21: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
foo.cpp:21: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
Source and Preprocessor output:
-------------------------------
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2000-02-10 17:37 CET by <avrchoti@frqmei5ux>.
# Source directory was `/home/avrchoti/egcs-bugs'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 297 -rw-rw-r-- foo.cpp
# 209 -rw-rw-r-- foo.ii
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
if test "$gettext_dir" = FAILED && test -f $dir/gettext \
&& ($dir/gettext --version >/dev/null 2>&1)
then
set `$dir/gettext --version 2>&1`
if test "$3" = GNU
then
gettext_dir=$dir
fi
fi
if test "$locale_dir" = FAILED && test -f $dir/shar \
&& ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
then
locale_dir=`$dir/shar --print-text-domain-dir`
fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
echo=echo
else
TEXTDOMAINDIR=$locale_dir
export TEXTDOMAINDIR
TEXTDOMAIN=sharutils
export TEXTDOMAIN
echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$2 "$8"'
else
shar_touch=:
echo
$echo 'WARNING: not restoring timestamps. Consider getting and'
$echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh21734; then
$echo 'x -' 'creating lock directory'
else
$echo 'failed to create lock directory'
exit 1
fi
# ============= foo.cpp ==============
if test -f 'foo.cpp' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'foo.cpp' '(file already exists)'
else
$echo 'x -' extracting 'foo.cpp' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'foo.cpp' &&
X
//
// This causes "Internal compiler error 373" with egcs-2.91.66
//
X
namespace foo
{
X namespace bar
X {
X enum baz
X {
X abc = 17,
X def,
X ghi
X };
X }
}
X
int main( void )
{
X int x = foo::bar:def; // There is a colon missing in this line
X
X return x;
}
X
SHAR_EOF
(set 20 00 02 10 17 27 37 'foo.cpp'; eval "$shar_touch") &&
chmod 0664 'foo.cpp' ||
$echo 'restore of' 'foo.cpp' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'foo.cpp:' 'MD5 check failed'
62a6381cd1a78fe3aba87ba8e205b1d0 foo.cpp
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'foo.cpp'`"
test 297 -eq "$shar_count" ||
$echo 'foo.cpp:' 'original size' '297,' 'current size' "$shar_count!"
fi
fi
# ============= foo.ii ==============
if test -f 'foo.ii' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'foo.ii' '(file already exists)'
else
$echo 'x -' extracting 'foo.ii' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'foo.ii' &&
# 1 "foo.cpp"
X
X
X
X
X
namespace foo
{
X namespace bar
X {
X enum baz
X {
X abc = 17,
X def,
X ghi
X };
X }
}
X
int main( void )
{
X int x = foo::bar:def;
X
X return x;
}
X
SHAR_EOF
(set 20 00 02 10 17 36 34 'foo.ii'; eval "$shar_touch") &&
chmod 0664 'foo.ii' ||
$echo 'restore of' 'foo.ii' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'foo.ii:' 'MD5 check failed'
dc0d1e194898cd03812e72fc51c80235 foo.ii
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'foo.ii'`"
test 209 -eq "$shar_count" ||
$echo 'foo.ii:' 'original size' '209,' 'current size' "$shar_count!"
fi
fi
rm -fr _sh21734
exit 0
Best regards,
--
------------------------------------
Dr. Alexander Vrchoticky
CSW-V4
FREQUENTIS
A-1120 Wien, Spittelbreitengasse 34
http://www.frequentis.com
Tel. +43/1/81150-2333, Fax -2299
-----------------------------------
More information about the Gcc-bugs
mailing list