From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20B273857354; Sun, 12 Jun 2022 17:33:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20B273857354 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/105936] [10 Regression] ICE with inline-asm and TLS on x86_64 and -O2 in move_insn Date: Sun, 12 Jun 2022 17:33:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 9.4.0 X-Bugzilla-Keywords: ice-on-valid-code, inline-asm, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords short_desc 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: Sun, 12 Jun 2022 17:33:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105936 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs-reduction |inline-asm Summary|[10 Regression] internal |[10 Regression] ICE with |compiler error: in |inline-asm and TLS on |move_insn, at |x86_64 and -O2 in move_insn |haifa-sched.c:5463 | --- Comment #1 from Andrew Pinski --- Reduced testcase: typedef struct { unsigned short offset; unsigned short segment; } far_t; extern __thread int vm86u[8]; int int33_hooked; int is_revectored(void); void log_printf(void); far_t int33_unrevect(unsigned short gg) { far_t ret =3D {};=20 if (int33_hooked) return ret; if (is_revectored()) {=20 log_printf(); __asm__ __volatile__("" : :"m" (vm86u[0])); } else=20 {=20 if (gg) log_printf(); }=20 ret.segment =3D 0x0f000;=20 ret.offset =3D 0xf847; return ret; }=