public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/99123] New: ICE in decompose_normal_address, at rtlanal.c:6710
Date: Tue, 16 Feb 2021 17:40:57 +0000	[thread overview]
Message-ID: <bug-99123-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99123

            Bug ID: 99123
           Summary: ICE in decompose_normal_address, at rtlanal.c:6710
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 at -O1+.
Testfile derived from gcc/testsuite/gcc.target/i386/20020729-1.c
with string "1" changed to "" :


$ cat z1.c
static inline void *
baz (void *s, unsigned long c, unsigned int count)
{
  int d0, d1;
  __asm__ __volatile__ (""
                        : "=&c" (d0), "=&D" (d1)
                        :"a" (c), "q" (count), "0" (count / 4), "" ((long) s)  
/// "1"
                        :"memory");
  return s;
}

struct A
{
  unsigned long *a;
};

inline static void *
bar (struct A *x, int y)
{
  char *ptr;

  ptr = (void *) x->a[y >> 12];
  ptr += y % (1UL << 12);
  return (void *) ptr;
}

int
foo (struct A *x, unsigned int *y, int z, int u)
{
  int a, b, c, d, e;

  z += *y;
  c = z + u;
  a = (z >> 12) + 1;
  do
    {
      b = (a << 12);
      d = b - z;
      e = c - z;
      if (e < d)
        d = e;
      baz (bar (x, z), 0, d);
      z = b;
      a++;
    }
  while (z < c);
  return 0;
}


$ gcc-11-20210214 -c z1.c -O2
during RTL pass: reload
z1.c: In function 'foo':
z1.c:48:1: internal compiler error: in decompose_normal_address, at
rtlanal.c:6710
   48 | }
      | ^
0xb10f70 decompose_normal_address
        ../../gcc/rtlanal.c:6710
0xb10f70 decompose_address(address_info*, rtx_def**, machine_mode, unsigned
char, rtx_code)
        ../../gcc/rtlanal.c:6787
0x9f4f3c uses_hard_regs_p
        ../../gcc/lra-constraints.c:1911
0x9f4f9a uses_hard_regs_p
        ../../gcc/lra-constraints.c:1922
0x9f7bd1 process_alt_operands
        ../../gcc/lra-constraints.c:3097
0x9fb81b curr_insn_transform
        ../../gcc/lra-constraints.c:4078
0x9fe556 lra_constraints(bool)
        ../../gcc/lra-constraints.c:5143
0x9ec8b2 lra(_IO_FILE*)
        ../../gcc/lra.c:2336
0x9a7689 do_reload
        ../../gcc/ira.c:5827
0x9a7689 execute
        ../../gcc/ira.c:6013

             reply	other threads:[~2021-02-16 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 17:40 gscfq@t-online.de [this message]
2021-02-16 18:19 ` [Bug inline-asm/99123] [8/9/10/11 Regression] " jakub at gcc dot gnu.org
2021-02-23 18:58 ` vmakarov at gcc dot gnu.org
2021-02-24 18:58 ` cvs-commit at gcc dot gnu.org
2021-02-26 11:54 ` [Bug inline-asm/99123] [8/9/10 " rguenth at gcc dot gnu.org
2021-05-14  9:54 ` [Bug inline-asm/99123] [9/10 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug rtl-optimization/99123] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07  9:27 ` rguenth at gcc dot gnu.org

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=bug-99123-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).