This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/7695: i686/athlon specific ICE
- From: Bruno Haible <haible at ilog dot fr>
- To: gcc-gnats at gcc dot gnu dot org
- Cc: "Jim Gifford" <jim at jg555 dot com>
- Date: Fri, 23 Aug 2002 12:36:19 +0200 (CEST)
- Subject: c/7695: i686/athlon specific ICE
>Number: 7695
>Category: c
>Synopsis: i686/athlon specific ICE on simple arithmetic function
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Fri Aug 23 03:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Bruno Haible
>Release: 3.2
>Organization:
GNU hackers
>Environment:
System: Linux linuix 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.2/configure --prefix=/packages/gnu-inst-gcc/3.2 --enable-shared --enable-version-specific-runtime-libs --enable-nls --enable-threads=posix
>Description:
$ LC_ALL=C gcc -march=i686 -O2 -S j.c
j.c: In function `gbkext1_mbtowc':
j.c:28: unrecognizable insn:
(insn 163 161 165 (set (reg:QI 82)
(const_int 128 [0x80])) -1 (nil)
(nil))
j.c:28: Internal compiler error in extract_insn, at recog.c:2148
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
$ LC_ALL=C gcc -march=athlon -O2 -S j.c
j.c: In function `gbkext1_mbtowc':
j.c:28: unrecognizable insn:
(insn 161 159 163 (set (reg:QI 82)
(const_int 128 [0x80])) -1 (nil)
(nil))
j.c:28: Internal compiler error in extract_insn, at recog.c:2148
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Without -march=i686 or -march=athlon there is no problem.
>How-To-Repeat:
See above. Here is j.c:
=============================== j.c ======================================
extern const unsigned short gbkext1_2uni_page81[6080];
int gbkext1_mbtowc (unsigned int *pwc, const unsigned char *s, int n)
{
unsigned char c1 = s[0];
if (c1 >= 0x81 && c1 <= 0xa0)
{
if (n >= 2)
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0x80 && c2 < 0xff))
{
unsigned int i =
190 * (c1 - 0x81) + (c2 - (c2 >= 0x80 ? 0x41 : 0x40));
unsigned short wc = 0xfffd;
if (i < 6080)
wc = gbkext1_2uni_page81[i];
if (wc != 0xfffd)
{
*pwc = (unsigned int) wc;
return 2;
}
}
return -1;
}
return -2;
}
return -1;
}
==========================================================================
And here is a minimal j.c:
==========================================================================
int gbkext1_mbtowc (unsigned char c1, unsigned char c2)
{
return c1 + (c2 - (c2 >= 0x80 ? 0x41 : 0x40));
}
==========================================================================
>Fix:
unknown
>Release-Note:
>Audit-Trail:
>Unformatted: