From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 548683858C50; Tue, 20 Sep 2022 07:19:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 548683858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663658390; bh=X9nRgZqrQ5Scltv28DxKI10iwCpAk3pQKlr7nfFGnvg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yfptElsZXBsEpCBS/0mziaVhTOHPFsa3HH5XXQtuDJduo9F+6a8eh3JLPcO4GrUYq TiDAub7wV5vwy+0kRbTaS5veZ5EQtTbq8UXJTkuCT3G8XG34eQxRVWLOCPwS1WDwcL 3OsMAx2uCx/GbS7EY2I1+fLrYXxfy7AXk5uldTFc= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn" Date: Tue, 20 Sep 2022 07:19:49 +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: 12.2.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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=3D106966 --- Comment #4 from Uro=C5=A1 Bizjak --- (In reply to Christian Ehrhardt from comment #3) > > Just drop -mbuild-constants. >=20 > Thanks for the hint Uro=C5=A1, but I'm not sure if one can do that, this = option > is from [1]. I do not have the background on this, but it reads as there = was > a reason "Use -mbuild-constants to prevent the compiler using static data" > to set this which seems more breaking than my current workaround (reduce = -O2 > to -O1). >=20 > [1]: > https://github.com/qemu/qemu-palcode/commit/ > 0830e72f0bce29bdf1de0d67ad503a9a8b99c968 -mbuild-constants is used here together with -msmall-data (which limits relocations to the small data area to 16 bits). -mbuild-constants option tr= ies harder to construct 64-bit constants using arithmetic with immediates inste= ad of loads from the small data area. So, if the linker does not error out with relocation overflow, it can be safely omitted. The fix to the compiler is relatively straightforward, but I have no access= to alpha system any more to properly test the fix (and I have no patience to r= un the testsuite on the simulator). The -mbuild-constant option is rarely used, and the proposed workaround should be safe.=