From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06E1838708F2; Wed, 27 May 2020 02:03:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06E1838708F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590545035; bh=PTVU0XfPLxCP3dZVmCFWg7dMzzPNe/GqKcrhubRaH+Q=; h=From:To:Subject:Date:From; b=ZJuklAaacnsblQ55wUPk8VbviPJMOdJet4c8FPchFXzYwFWT4I9TN5nerVXXxwvyR fNLzSxw8WIZ19WygIHencEAOcFVtDH+/xKGzabXO8aR2eEDtUkkCo6MY/VfjlzL+KD z2TfxXDEovrO1UopjvWSlH7e8XvkMvzgTxVrA5UI= From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/95353] New: [10/11 Regression] GCC can't build binutils Date: Wed, 27 May 2020 02:03:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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: Wed, 27 May 2020 02:03:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95353 Bug ID: 95353 Summary: [10/11 Regression] GCC can't build binutils Product: gcc Version: 10.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com CC: msebor at gcc dot gnu.org Target Milestone: --- Assembler in binutils has struct frag { ... /* Data begins here. */ char fr_literal[1]; }; and fr_literal is accessed as char *buf =3D fragp->fr_fix + fragp->fr_literal; GCC 10 gave gas/config/tc-csky.c: In function =E2=80=98md_convert_frag=E2=80=99: gas/config/tc-csky.c:4507:9: error: writing 1 byte into a region of size 0 [-Wer ror=3Dstringop-overflow=3D] 4507 | buf[1] =3D BYTE_1 (CSKYV1_INST_SUBI | (7 << 4)); | ^ I checked in this: char *buf =3D fragp->fr_fix + &fragp->fr_literal[0]; as a workaround. But it doesn't solve the problem in existing binutils sources and some future version of gcc might see through the obfuscation of the source, rendering this work-around ineffective. is there a solution which is future proof?=