From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B4ED3858409; Fri, 31 Mar 2023 20:32:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B4ED3858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680294744; bh=zGlGYcwM2+0+TMDJXCUQaBIffiG56mGMQjkFaOLrqOw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xUkG1Zz6LCVbdUmMc4vs1xqbX66F76V7FbV6sZvKsI/hAdv793tpHOrl84QHXsbCO Zlp9awku3Zbufz/H8wOq+lOanweE879YKRn0xvFtuKUG+qZi/jg5L2DY14zhUWZEar umohJ/t7AJZh+3nmuWYiMrxMMj0j4901MaK57szE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105523] Wrong warning array subscript [0] is outside array bounds Date: Fri, 31 Mar 2023 20:32: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: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D105523 --- Comment #17 from Andrew Pinski --- (In reply to David Crocker from comment #16) > This issue is not specific to AVR target. I get the same spurious warning > from gcc 12.2 arm-none-eabi when I compile the following code for ARM Cor= tex > M0+ and M4 targets: >=20 > const char *bootloaderVersionText =3D *reinterpret_cast(0x2= 0); >=20 > I haven't found a workaround other than to use a pragma to disable the > warning for that line of code. The change in your build would be --param=3Dmin-pagesize=3D0 . I made a men= tion of this a few times in this bug report on why avr is different from arm here.=