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]

c/3835: ICE in eliminate_regs, at reload1.c:2584 -- gcc version 3.1 20010724 (experimental)



>Number:         3835
>Category:       c
>Synopsis:       ICE in eliminate_regs, at reload1.c:2584 -- gcc version 3.1 20010724 (experimental)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 26 16:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     harinath@cs.umn.edu
>Release:        gcc version 3.1 20010724 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The following is a heavily distilled testcase for a ICE in eliminate_regs.

The testcase uses an 'asm' statement, but I believe it is machine 
independent.  The asm body proper is empty, and the only constraints
used are 'r' and 'm'.
--------------------------------------------------
// test.c

extern void foo (void);
int bar ()
{
  char code = 0;
  for (;;)
    {
      asm ("" : : "r" (0));
      if (code < 0)
	foo ();
      if (({ char res; asm ("" : "=r" (res) : "r" (0), "m" (code)); res; }))
	foo ();
    }
}
>How-To-Repeat:
han ~/z/z > gcc -c -O2 -Wall test.c
test.c: In function `bar':
test.c:15: Internal compiler error in eliminate_regs, at reload1.c:2584
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
han ~/z/z > gcc -v
Reading specs from /home/grad04/harinath/linux/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../../configure --prefix=/home/grad04/harinath --exec-prefix=/home/grad04/harinath/linux --enable-threads=posix --enable-shared --enable-languages=c,c++,f77,objc,java --enable-java-awt=xlib
Thread model: posix
gcc version 3.1 20010724 (experimental)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.c"

Ly8gdGVzdC5jCgpleHRlcm4gdm9pZCBmb28gKHZvaWQpOwppbnQgYmFyICgpCnsKICBjaGFyIGNv
ZGUgPSAwOwogIGZvciAoOzspCiAgICB7CiAgICAgIGFzbSAoIiIgOiA6ICJyIiAoMCkpOwogICAg
ICBpZiAoY29kZSA8IDApCglmb28gKCk7CiAgICAgIGlmICgoeyBjaGFyIHJlczsgYXNtICgiIiA6
ICI9ciIgKHJlcykgOiAiciIgKDApLCAibSIgKGNvZGUpKTsgcmVzOyB9KSkKCWZvbyAoKTsKICAg
IH0KfQo=


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