public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: dhananjayd@kpitcummins.com
To: gcc-gnats@gcc.gnu.org
Subject: target/10413: SH ICE 3.3 branch
Date: Tue, 15 Apr 2003 12:06:00 -0000	[thread overview]
Message-ID: <20030415120035.28011.qmail@sources.redhat.com> (raw)


>Number:         10413
>Category:       target
>Synopsis:       SH ICE 3.3 branch
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 15 12:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     dhananjayd@kpitcummins.com
>Release:        3.2, 3.3 branch
>Organization:
>Environment:
Linux X SH
>Description:
The source code below if compiled with sh-elf-gcc -S -m2 -O2 -mhitachi gives Internal Compiler error.

[dhananjayd@Linuxsrv5 gnu]$ ~/sh2e-elf/bin/sh-elf-gcc -S -m2  -O2 -mhitachi bug.c  
bug.c: In function `func1':
bug.c:39: error: insn does not satisfy its constraints:
(insn:HI 29 28 160 0 0x4015b980 (set (reg/v:SI 148 mach [166])
        (reg:SI 149 macl)) 122 {movsi_i} (insn_list 28 (nil))
    (expr_list:REG_EQUAL (mult:SI (reg:SI 0 r0 [172])
            (reg/v:SI 11 r11 [163]))
        (nil)))
bug.c:39: internal compiler error: in reload_cse_simplify_operands, at reload1.c
:8335
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

-----------------------------------------------------------
int func0 (unsigned long  address,
    unsigned long  stride,
    char*          p_buffer,
    unsigned long  count,
    unsigned short chk);

int func1 (unsigned short type,
    unsigned long  count,
    unsigned long  address,
    unsigned long  stride,
    void*          buffer)
{
  unsigned long  remainder = count;
  unsigned long  block_size;
  unsigned short chk;
  char*          p_buffer = buffer;
  int            err      = 0;

  block_size = 0x3ff0/8/stride * stride;

  while (remainder)
    {
      if (type == 0)
        {
          while (1)
            {
              count = (remainder < block_size) ? remainder : block_size;
              err   = func0 (address, stride, p_buffer, count, chk = 0);
              if (err) break;
            }
          count     = (count < 2) ? count : count - 1;
          p_buffer += count;
        }
      remainder -= count;
      address   += count * stride;
    }
  return err;
}

-----------------------------------------------------------

It is trying to load macl into mach but no such instruction exists. The problem disappears in mainline but could appear with different test case with more register pressure.
>How-To-Repeat:
Try compiling above test case with sh-elf-gcc -S -m2  -O2 -mhitachi bug.c  
>Fix:
Remove -mhitachi option.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.c"

DQppbnQgZnVuYzAgKHVuc2lnbmVkIGxvbmcgIGFkZHJlc3MsDQogICAgdW5zaWduZWQgbG9uZyAg
c3RyaWRlLA0KICAgIGNoYXIqICAgICAgICAgIHBfYnVmZmVyLA0KICAgIHVuc2lnbmVkIGxvbmcg
IGNvdW50LA0KICAgIHVuc2lnbmVkIHNob3J0IGNoayk7DQoNCmludCBmdW5jMSAodW5zaWduZWQg
c2hvcnQgdHlwZSwNCiAgICB1bnNpZ25lZCBsb25nICBjb3VudCwNCiAgICB1bnNpZ25lZCBsb25n
ICBhZGRyZXNzLA0KICAgIHVuc2lnbmVkIGxvbmcgIHN0cmlkZSwNCiAgICB2b2lkKiAgICAgICAg
ICBidWZmZXIpDQp7DQogIHVuc2lnbmVkIGxvbmcgIHJlbWFpbmRlciA9IGNvdW50Ow0KICB1bnNp
Z25lZCBsb25nICBibG9ja19zaXplOw0KICB1bnNpZ25lZCBzaG9ydCBjaGs7DQogIGNoYXIqICAg
ICAgICAgIHBfYnVmZmVyID0gYnVmZmVyOw0KICBpbnQgICAgICAgICAgICBlcnIgICAgICA9IDA7
DQoNCiAgYmxvY2tfc2l6ZSA9IDB4M2ZmMC84L3N0cmlkZSAqIHN0cmlkZTsNCg0KICB3aGlsZSAo
cmVtYWluZGVyKQ0KICAgIHsNCiAgICAgIGlmICh0eXBlID09IDApDQogICAgICAgIHsNCiAgICAg
ICAgICB3aGlsZSAoMSkNCiAgICAgICAgICAgIHsNCiAgICAgICAgICAgICAgY291bnQgPSAocmVt
YWluZGVyIDwgYmxvY2tfc2l6ZSkgPyByZW1haW5kZXIgOiBibG9ja19zaXplOw0KICAgICAgICAg
ICAgICBlcnIgICA9IGZ1bmMwIChhZGRyZXNzLCBzdHJpZGUsIHBfYnVmZmVyLCBjb3VudCwgY2hr
ID0gMCk7DQogICAgICAgICAgICAgIGlmIChlcnIpIGJyZWFrOw0KICAgICAgICAgICAgfQ0KICAg
ICAgICAgIGNvdW50ICAgICA9IChjb3VudCA8IDIpID8gY291bnQgOiBjb3VudCAtIDE7DQogICAg
ICAgICAgcF9idWZmZXIgKz0gY291bnQ7DQogICAgICAgIH0NCiAgICAgIHJlbWFpbmRlciAtPSBj
b3VudDsNCiAgICAgIGFkZHJlc3MgICArPSBjb3VudCAqIHN0cmlkZTsNCiAgICB9DQogIHJldHVy
biBlcnI7DQp9DQoNCg==


             reply	other threads:[~2003-04-15 12:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-15 12:06 dhananjayd [this message]
2003-05-10  9:36 Dara Hazeghi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030415120035.28011.qmail@sources.redhat.com \
    --to=dhananjayd@kpitcummins.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).