From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 237BF386EC49; Mon, 8 Feb 2021 09:34:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 237BF386EC49 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/98991] ICE: Max. number of generated reload insns per insn is achieved (90) Date: Mon, 08 Feb 2021 09:34:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: inline-asm X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: keywords component Message-ID: In-Reply-To: References: 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: Mon, 08 Feb 2021 09:34:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98991 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Component|c++ |inline-asm --- Comment #2 from Richard Biener --- it looks reduced ad absurdum but the issue must lie in asm("":"=3Drmf"(f),"=3Dd"([t(reinterpret_cast(0))]{}):"0"(((0))),""((= 0))); which I can't really parse but we expand from int {anonymous}::n () { int D.2351; struct ._anon_1 t; float f; int D.2422; struct ._anon_0 D.2374; register int * D.2360; void * _1; int _5; ;; basic block 2, loop depth 0 ;; pred: ENTRY D.2374.__t =3D 0; __asm__("" : "=3Drmf" f, "=3Dd" D.2374 : "0" 0, "" 0); likely D.2374 is not re-loadable into DREG. The zero seems to be SFmode: (insn 6 2 7 2 (set (reg:SI 86) (const_int 0 [0])) "t.ii":1:163 75 {*movsi_internal} (nil)) (insn 7 6 11 2 (parallel [ (set (mem/c:SF (plus:DI (reg/f:DI 19 frame) (const_int -4 [0xfffffffffffffffc])) [1 f+0 S4 A32]) (asm_operands:SF ("") ("=3Drmf") 0 [ (reg:SI 86) (const_int 0 [0]) ] [ (asm_input:SI ("0") t.ii:1) (asm_input:SI ("") t.ii:1) ] [] t.ii:1)) (set (reg:SI 84 [ D.2374 ]) (asm_operands:SI ("") ("=3Dd") 1 [ (reg:SI 86) (const_int 0 [0]) ] [ (asm_input:SI ("0") t.ii:1) (asm_input:SI ("") t.ii:1) ] [] t.ii:1)) (clobber (reg:CC 17 flags)) ]) "t.ii":1:163 -1 (expr_list:REG_DEAD (reg:SI 86) (expr_list:REG_UNUSED (reg:SI 84 [ D.2374 ]) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))))) and we fail to reload. It _looks_ similar to void foo(float f) { struct { float f; } x; asm("": "=3Df" (f), "=3Dd" (x) : "0" (0), "" (0)); } but we reject this via t.i: In function 'void foo(float)': t.i:4:3: error: inconsistent operand constraints in an 'asm' 4 | asm("": "=3Df" (f), "=3Dd" (x) : "0" (0), "" (0)); | ^~~=