From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C7EB93858417; Fri, 19 Jan 2024 23:06:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7EB93858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705705560; bh=sxvU3Xl49nsFjSqwNn+SM0Ez7qdzDI3qMrGijAIj/8o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jYqZtJ9kojxqdW1bKPsTnl4c2gqeI4tY3LTxyvFjyL4Da0RBVH9PNMKz7hcARqzkn t/pmdXq03lWIkRWDvsWoyzwdK0h/bAH/jT/4/0HjYJusHRUf3bG86D6vh9YBj7l1E4 oK2FQS6zcVCzzF1G3FrBHfq+bPDz4BwvTu03Z3CA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108640] ICE compiling busybox for m68k in change_address_1, at emit-rtl.cc:2283 Date: Fri, 19 Jan 2024 23:05:59 +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, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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=3D108640 --- Comment #8 from GCC Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:a834414794d80f21550dd0591e260fc833f49eb9 commit r14-8298-ga834414794d80f21550dd0591e260fc833f49eb9 Author: Mikael Pettersson Date: Fri Jan 19 16:05:34 2024 -0700 [PATCH] Avoid ICE in single-bit logical RMWs on m68k-uclinux [PR108640] When generating RMW logical operations on m68k, the backend recognizes single-bit operations and rewrites them as bit instructions on operands adjusted to address the intended byte. When offsetting the addresses the backend keeps the modes as SImode, even though the actual access will be in QImode. The uclinux target defines M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P which adds a check that the adjusted operand is within the bounds of the original object. Since the address has been offset it is not, and the compiler ICEs. The bug is that the modes of the adjusted operands should have been narrowed to QImode, which is that this patch does. Nearby code which narrows to HImode gets that right. Bootstrapped and regression tested on m68k-linux-gnu. Ok for master? (Note: I don't have commit rights.) gcc/ PR target/108640 * config/m68k/m68k.cc (output_andsi3): Use QImode for address adjusted for 1-byte RMW access. (output_iorsi3): Likewise. (output_xorsi3): Likewise. gcc/testsuite/ PR target/108640 * gcc.target/m68k/pr108640.c: New test.=