This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal error #122
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Internal error #122
- From: Nicolas Galan <nick at buf dot fr>
- Date: Fri, 19 Jan 2001 16:57:41 -0800
Hello,
I have a piece of code that creates an internal error in gcc that
ask me to do a bug report. So here it is.
VERSION AND OS: gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
LINE OF COMMAND: gcc FooFile.cpp
FooFile.cpp: In function `int main ()':
FooFile.cpp:8: parse error before `||'
FooFile.cpp:10: Internal error #122.
FooFile.cpp:10: Internal compiler error in finish_function, at
../gcc/cp/decl.c:14422
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
SOURCE FILE: FooFile.cpp
int main()
{
int a = 1;
int b = 2;
int c = 3;
int d = 4;
if ( a < b ) || ( c < d )
{
}
return 0;
}
OPTION GIVEN WHEN GCC WAS COMPILED :
the standard rpm package of Red Hat Linux 7.0
Of course there is a bug in the example. I have forgotten parenthesis
around my tests
with the if. That what I isolated in a bigger program which was the
reason of the internal
error in gcc.
I think a line like
if (TEST1) || (TEST2)
generates this internal error ( and generates a message of parse error
for the user of course ;-) )
Bye and many thanks for this cool tool.
Nicolas Galan (nick@buf.com).