From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1327 invoked by alias); 22 Feb 2002 21:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 1258 invoked by uid 71); 22 Feb 2002 21:56:00 -0000 Resent-Date: 22 Feb 2002 21:56:00 -0000 Resent-Message-ID: <20020222215600.1255.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, pbarada@mail.wm.sps.mot.com Received:(qmail 28995 invoked from network); 22 Feb 2002 21:54:28 -0000 Received: from unknown (HELO ftpbox.mot.com) (129.188.136.101) by sources.redhat.com with SMTP; 22 Feb 2002 21:54:28 -0000 Received: [from pobox2.mot.com (pobox2.mot.com [136.182.15.8]) by ftpbox.mot.com (ftpbox 2.1) with ESMTP id OAA16685 for ; Fri, 22 Feb 2002 14:54:27 -0700 (MST)] Received: [from mail.wm.sps.mot.com ([199.10.246.2]) by pobox2.mot.com (MOT-pobox2 2.0) with ESMTP id OAA03735 for ; Fri, 22 Feb 2002 14:54:27 -0700 (MST)] Received: from hyper.wm.sps.mot.com (hyper.wm.sps.mot.com [199.10.246.43]) by mail.wm.sps.mot.com (8.9.3/8.9.3) with ESMTP id QAA14688 for ; Fri, 22 Feb 2002 16:54:19 -0500 Received: by hyper.wm.sps.mot.com (8.11.2) id g1MLsP821012; Fri, 22 Feb 2002 16:54:25 -0500 Message-Id:<200202222154.g1MLsP821012@hyper.wm.sps.mot.com> Date: Fri, 22 Feb 2002 14:06:00 -0000 From: pbarada@mail.wm.sps.mot.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: c/5753: gcc-3.0.4 w/target of m68k-elf gets ICE X-SW-Source: 2002-02/txt/msg00576.txt.bz2 List-Id: >Number: 5753 >Category: c >Synopsis: gcc-3.0.4 w/target of m68k-elf gets ICE >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Fri Feb 22 13:56:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Peter Barada >Release: 3.0.4 >Organization: >Environment: System: Linux hyper.wm.sps.mot.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: m68k-unknown-elf configured with: /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-3.0.4/configure --target=m68k-elf --prefix=/usr/local/wave/cross-test-304 --enable-languages=c,c++ --with-local-prefix=/usr/local/wave/cross-test-304/m68k-elf --with-newlib >Description: gcc-3.0.4 conifigured for m68k-elf generates an ICE when run with -m5200. This is cause by reload choosing an address register when the load is QImode from memory. The 5200 doesn't support loading a QImode into an address register: /usr/local/wave/cross-test-304/bin/m68k-elf-gcc -fno-exceptions -S -gstabs -malign-int -Wall -Wno-format -m5200 /tmp/cfprintf4.c -o /tmp/cfprintf4.s -da /tmp/cfprintf4.c: In function `_vformat': /tmp/cfprintf4.c:58: Insn does not satisfy its constraints: (insn 258 38 185 (set (reg:QI 8 %a0) (mem/f:QI (plus:SI (reg/f:SI 14 %a6) (const_int -1 [0xffffffff])) 0)) 37 {*m68k.md:1060} (nil) (nil)) /tmp/cfprintf4.c:58: Internal compiler error in final_scan_insn, at final.c:2876 >>From the cfprintf4.c.20.greg file: Reloads for insn # 185 Reload 0: reload_out (SI) = (reg:SI 68) ADDR_REGS, RELOAD_FOR_OUTPUT (opnum = 0) reload_out_reg: (reg:SI 68) reload_reg_rtx: (reg:SI 8 %a0) Reload 1: reload_in (QI) = (mem/f:QI (plus:SI (reg/f:SI 14 %a6) (const_int -1 [0xffffffff])) 0) ADDR_REGS, RELOAD_FOR_INPUT (opnum = 1) reload_in_reg: (mem/f:QI (plus:SI (reg/f:SI 14 %a6) (const_int -1 [0xffffffff])) 0) reload_reg_rtx: (reg:QI 8 %a0) note the reload choice for QImode... It compiles w/o ICE(I don't have any idea if code is correct) for m6800, m68020, m68030, m68040, m68060. >How-To-Repeat: typedef __builtin_va_list va_list; extern char *_fmtcvt(unsigned int value, int base, char *cp); extern int strlen(const char *s); void _vformat (void (*putsub)(char c, char **p), char **putbuf, const char *fmt, va_list argp) { char c; int i; char *cp; char s[512]; cp = s+14; for (;;) { c = *fmt++; if (!c) { break; } s[14] = 0; switch (c) { case 'o': cp = _fmtcvt((unsigned int)(__builtin_va_arg(argp, unsigned int)), 8, s+14); i = (s+14) - cp; break; case 'u': cp = _fmtcvt((unsigned int)(__builtin_va_arg(argp, unsigned int)), 10, s+14); i = (s+14) - cp; break; case 'd': cp = _fmtcvt((unsigned int)(__builtin_va_arg(argp, int)), -10, s+14); i = (s+14) - cp; break; case 'p': cp = _fmtcvt((unsigned int)(__builtin_va_arg(argp, void*)), 16, s+14); i = (s+14) - cp; break; case 's': i = strlen(cp = __builtin_va_arg(argp, char *)); break; default: cp = s; s[0] = c; s[i = 1] = 0; } if (i == 0) { continue; } } } >Fix: >Release-Note: >Audit-Trail: >Unformatted: