From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 03B273835E05; Wed, 7 Dec 2022 06:32:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03B273835E05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670394773; bh=66UVD0p652+9Bb2UOclNaz8DnpML2MHT3F11YKo8gPc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=crtlA7PQqBGDKkNjA1853ocR7P9cwCSePPKXpX95LBs4lQoO1W29n9ezhS/98QhwX Le6sVUR03M5/ZQnd9+VpcdVSRDyksp18KkYoohK8KVs3Hp7EdP6CpPNb+shSDhqruS 3kZyYS4ud6iy+707EeQGoULvqo8Rm0ueGyi7L8vo= From: "ahmad at a3f dot at" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105523] Wrong warning array subscript [0] is outside array bounds Date: Wed, 07 Dec 2022 06:32:50 +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: ahmad at a3f dot at 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: cc 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 Ahmad Fatoum changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahmad at a3f dot at --- Comment #14 from Ahmad Fatoum --- Does param=3Dmin-pagesize=3D0 solely influence warnings or could it now or = in the future affect code generation/optimization? I ask because barebox (https://barebox.org) also has this problem as on i.M= X8, where it calls into ROM code, which starts at address 0. After that's done,= it maps the NULL page there and normal accesses are unexpected. So if it's just about the warning, I'd prefer hiding pointer value via a compiler barrier w= here appliable instead of disabling the warning altogether.=