From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A655385EC56; Mon, 16 Nov 2020 16:37:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A655385EC56 From: "qinzhao at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/97777] ICE: in df_refs_verify, at df-scan.c:3991 with -O -ffinite-math-only -fzero-call-used-regs=all Date: Mon, 16 Nov 2020 16:37:28 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: qinzhao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: qinzhao at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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 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, 16 Nov 2020 16:37:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97777 --- Comment #4 from qinzhao at gcc dot gnu.org --- this should be a bug in the pass "stack". if I modify the file "reg-stack.c" as following: qinzhao@gcc10:~/Work/write_gcc/gcc$ git diff reg-stack.c diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 8f98bd85750..3d6519c95c9 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -3428,6 +3428,7 @@ rest_of_handle_stack_regs (void) #ifdef STACK_REGS reg_to_stack (); regstack_completed =3D 1; + df_analyze (); #endif return 0; } the testing case will core dump at: t.c: In function =E2=80=98foo=E2=80=99: t.c:5:1: internal compiler error: in df_refs_verify, at df-scan.c:3991 5 | } | ^ 0xc3e634 df_refs_verify ../../write_gcc/gcc/df-scan.c:3991 0xc3e8a5 df_insn_refs_verify ../../write_gcc/gcc/df-scan.c:4075 0xc3ea83 df_bb_verify ../../write_gcc/gcc/df-scan.c:4107 0xc3f046 df_scan_verify() ../../write_gcc/gcc/df-scan.c:4228 0xc2576c df_verify() ../../write_gcc/gcc/df-core.c:1818 0xc23fdd df_analyze_1 ../../write_gcc/gcc/df-core.c:1214 0xc2439e df_analyze() ../../write_gcc/gcc/df-core.c:1290 0x115d581 rest_of_handle_stack_regs ../../write_gcc/gcc/reg-stack.c:3431 0x115d5d2 execute ../../write_gcc/gcc/reg-stack.c:3461 looks like that the pass reg stack does not maintain the df information correctly during its transformation.=