From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 076F9396EC9F; Tue, 16 Feb 2021 17:40:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 076F9396EC9F From: "gscfq@t-online.de" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 17:40:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99123 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__ ("" : "=3D&c" (d0), "=3D&D" (d1) :"a" (c), "q" (count), "0" (count / 4), "" ((long) = s)=20=20 /// "1" :"memory"); return s; } struct A { unsigned long *a; }; inline static void * bar (struct A *x, int y) { char *ptr; ptr =3D (void *) x->a[y >> 12]; ptr +=3D 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 +=3D *y; c =3D z + u; a =3D (z >> 12) + 1; do { b =3D (a << 12); d =3D b - z; e =3D c - z; if (e < d) d =3D e; baz (bar (x, z), 0, d); z =3D 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=