public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99123] New: ICE in decompose_normal_address, at rtlanal.c:6710
@ 2021-02-16 17:40 gscfq@t-online.de
  2021-02-16 18:19 ` [Bug inline-asm/99123] [8/9/10/11 Regression] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gscfq@t-online.de @ 2021-02-16 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-07  9:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 17:40 [Bug c/99123] New: ICE in decompose_normal_address, at rtlanal.c:6710 gscfq@t-online.de
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

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).