This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc 3.1 hangs forever on Red Hat 7.2 system
- From: Andy Tai <lichengtai at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Cc: atai at atai dot org
- Date: Tue, 4 Jun 2002 21:39:51 -0700 (PDT)
- Subject: gcc 3.1 hangs forever on Red Hat 7.2 system
- Reply-to: atai at atai dot org
Hi, I think this is a possible bug in gcc 3.1 but I
send to this list to be sure first. On a Red Hat
GNU/Linux 7.2 system (x86), with gcc 3.1, when
compiling the following source file with optimization
turned on (-O1 or above), gcc 3.1 hangs forever. With
optimization off (or use -O0), gcc 3.1 finishes
compiling with no problems.
test.c:
-----
void f(void)
{
char *c;
do
{
if (c)
break;
} while (1);
if (!c)
while (1)
f();
}
-----
The following command will hang forever (same with
-O2, -O3, etc.):
% gcc -O1 -c test.c
gcc 2.95.3 compiles the file without problems.
System information:
% gcc -v
Reading specs from
/share/software/gcc-3.1/installed/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc-3.1/configure
--prefix=/share/software/gcc-3.1/installed
--enable-threads --enable-languages=c,c++
Thread model: posix
gcc version 3.1
Thanks for any work arounds.
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com