From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26A6438582A4; Tue, 20 Jun 2023 16:42:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26A6438582A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687279351; bh=JH8jyJQrjBty0fbvfg8py+G2EHnObco3smuuB2ajlhw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c/fDEGszBvaw0KXpSBxDReIgE/UP9RpvfLiTvEtHDkeG9iFOgjFZ4l3jL5YkLFaZN HUWzTXjEck4DO7kVD5jknuB+35IrB+kDlaAz50pjzN6yRuoNwa2wsxlNx8bObFIbwX L/aZ6+Q3/gh+Y9NIRZkzkI35n/wTVtTAato5l5Og= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110307] ICE in move_insn, at haifa-sched.cc:5473 when building Ruby on alpha with -fPIC -O2 (or -fpeephole2 -fschedule-insns2) Date: Tue, 20 Jun 2023 16:42:30 +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: 13.1.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110307 --- Comment #6 from Alexander Monakov --- Cross-compiler needs HAVE_AS_EXPLICIT_RELOCS=3D1. With checking enabled, we get: t.c:8:1: error: flow control insn inside a basic block (call_insn 97 96 98 4 (parallel [ (set (reg:DI 0 $0) (call (mem:DI (reg:DI 27 $27) [0 S8 A64]) (const_int 0 [0]))) (set (reg:DI 29 $29) (unspec:DI [ (reg:DI 29 $29) (const_int 6 [0x6]) ] UNSPEC_LDGP1)) (use (symbol_ref:DI ("__tls_get_addr") [flags 0x41] )) (use (unspec [ (const_int 1 [0x1]) ] UNSPEC_TLSGD_CALL)) (clobber (reg:DI 26 $26)) ]) "t.c":6:22 -1 (nil) (expr_list (use (reg:DI 16 $16)) (nil))) during RTL pass: peephole2 dump file: t.c.313r.peephole2 t.c:8:1: internal compiler error: in rtl_verify_bb_insns, at cfgrtl.cc:2797 Insn 96 appears via: Splitting with gen_peephole2_8 (alpha.md:5972) scanning new insn with uid =3D 96. scanning new insn with uid =3D 97. scanning new insn with uid =3D 98. deleting insn with uid =3D 25. Insn 25 was: (call_insn/u 25 39 26 4 (parallel [ (set (reg:DI 0 $0) (call (mem:DI (symbol_ref:DI ("__tls_get_addr") [flags 0x41= ]=20 ) [0 S8 A64]) (const_int 0 [0]))) (unspec [ (const_int 1 [0x1]) ] UNSPEC_TLSGD_CALL) (use (reg:DI 29 $29)) (clobber (reg:DI 26 $26)) ]) "t.c":6:22 346 {call_value_osf_tlsgd} (expr_list:REG_DEAD (reg:DI 16 $16) (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000= ]) (nil))) (expr_list (use (reg:DI 16 $16)) (nil))) Note the REG_EH_REGION. This is relevant because can_nonlocal_goto checks i= t, so for insn 25 we knew it wouldn't return to the setjmp receiver. Applying = the peephole dropped the note.=