From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED1553858025; Thu, 4 Jan 2024 16:13:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED1553858025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704384805; bh=7TgtiygFa9UvWSovXJAi0NLNI8o2GKOGXL+fmIMqqXc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eyDaQ1IVyiGJ+ussMeS/rrNBhEsQ7pVKLcKMteWKpKlfoTzKJwwrkOwx96XyfKpYR we0AEAjIKBXIi2kjNUthnTf9uoPfrdF4HT3b0IwLNb+0qG14M+pNBbCJBVG0TGARSx oTFWrdqVsH4ASuCB0DKaTtU7WJigvVszrUTq2zW0= From: "mikpelinux at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110934] m68k: ICE with -fzero-call-used-regs=all compiling openssh 9.3p2 Date: Thu, 04 Jan 2024 16:13:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikpelinux at gmail dot com X-Bugzilla-Status: NEW 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=3D110934 --- Comment #11 from Mikael Pettersson --- Reduced test case: > cat ../pr110934.c=20 extern double clobber_fp0(void); void f(void) { clobber_fp0(); } > gcc/xgcc -Bgcc -fzero-call-used-regs=3Dused -fPIC -O -S ../pr110934.c during RTL pass: zero_call_used_regs ../pr110934.c: In function 'f': ../pr110934.c:2:31: internal compiler error: in change_address_1, at emit-rtl.cc:2299 2 | void f(void) { clobber_fp0(); } | ^ 0x40dc15 change_address_1 /mnt/scratch/other/mikpe-gcc.git/gcc/emit-rtl.cc:2299 0x69dc1e emit_move_insn(rtx_def*, rtx_def*) /mnt/scratch/other/mikpe-gcc.git/gcc/expr.cc:4717 0xa0cf63 default_zero_call_used_regs(unsigned long) /mnt/scratch/other/mikpe-gcc.git/gcc/targhooks.cc:1112 0x6ed8fa gen_call_used_regs_seq /mnt/scratch/other/mikpe-gcc.git/gcc/function.cc:5928 0x6ed8fa execute /mnt/scratch/other/mikpe-gcc.git/gcc/function.cc:6785 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. The issue is that to zero %fp0 the generic code synthesizes a move from (const_double:XF 0.0 [0x0.0p+0]) which is replaced by a label referencing a literal in .rodata, but that label is rejected by m68k_legitimate_constant_address_p due to -fPIC, which triggers the asserti= on failure in change_address_1.=