c/718: -Wall evokes apparent cc1 infloop (w/cvs as of 2000-10-31.03h12 UTC)

Jim Meyering meyering@ascend.com
Tue Oct 31 07:36:00 GMT 2000


>Number:         718
>Category:       c
>Synopsis:       -Wall evokes apparent cc1 infloop (w/cvs as of 2000-10-31.03h12 UTC)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 31 07:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jim Meyering
>Release:        2.97 20001030 (experimental)
>Organization:
>Environment:
System: Linux ixi.eng.ascend.com 2.2.17 #3 SMP Wed Sep 20 19:24:00 CEST 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
>Description:
This problem is reproducible using a very recent (12-hour old) snapshot
of the cvs trunk, and cvs-snapshots back to 2000-10-20.01h30.

This problem seems to have been checked in to the repository
between these dates:

  2000-10-12.08h50 UTC  (this doesn't infloop)
  2000-10-20.01h30 UTC  (this does)

The symptom is that compiling a simple program consumes over 60MB
of memory and appears to make cc1 infloop.

>How-To-Repeat:

Here's the code (derived from GNU tar-1.13.18's src/create.c
ftp://alpha.gnu.org/gnu/tar/tar-1.13.18.tar.gz ):

$ cat create.c
void
mode_to_chars (unsigned int v)
{
  unsigned long int u;
  u = ((v & 1 ? 21 : 0)
       | (v & 2 ? 22 : 0)
       | (v & 3 ? 23 : 0)
       | (v & 4 ? 24 : 0)
       | (v & 5 ? 25 : 0)
       | (v & 6 ? 26 : 0)
       | (v & 7 ? 27 : 0)
       | (v & 8 ? 28 : 0)
       | (v & 9 ? 29 : 0)
       | (v & 10 ? 30 : 0)
       | (v & 11 ? 31 : 0)
       | (v & 12 ? 32 : 0));
}

$ gcc -v -Wall create.c
Reading specs from /p/p/gcc-2000-10-31.03h12/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with:  --disable-nls --prefix=/p/p/gcc-2000-10-31.03h12
gcc version 2.97 20001030 (experimental)
 /p/p/gcc-2000-10-31.03h12/lib/gcc-lib/i686-pc-linux-gnu/2.97/cpp0 -lang-c -v -iprefix /p/bin/../lib/gcc-lib/i686-pc-linux-gnu/2.97/ -D__GNUC__=2 -D__GNUC_MINOR__=97 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__STDC_HOSTED__=1 -Wall -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ create.c /tmp/ccOqZjtD.i
GNU CPP version 2.97 20001030 (experimental) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/p/lib/gcc-lib/i686-pc-linux-gnu/2.97/include"
ignoring nonexistent directory "/p/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /p/p/gcc-2000-10-31.03h12/lib/gcc-lib/i686-pc-linux-gnu/2.97/include
 /p/p/gcc-2000-10-31.03h12/i686-pc-linux-gnu/include
 /usr/include
End of search list.
 /p/p/gcc-2000-10-31.03h12/lib/gcc-lib/i686-pc-linux-gnu/2.97/cc1 /tmp/ccOqZjtD.i -quiet -dumpbase create.c -Wall -version -o /tmp/ccYLSmK8.s
GNU C version 2.97 20001030 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.97 20001030 (experimental).




# wait a little, then run ps from another window:
$ ps auxww|grep -E 'USER|cc1'
USER       PID %CPU %MEM  SIZE   RSS TTY STAT START   TIME COMMAND
meyering 14820 95.2 22.3 68608 64784  b4 R    16:07   2:06 /p/p/gcc-2000-10-31.03h12/lib/gcc-lib/i686-pc-linux-gnu/2.97/cc1 /tmp/cc9ziBln.i -quiet -dumpbase create.c -Wall -version -o /tmp/ccI8Hl9B.s

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list