From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3095E385222B; Wed, 23 Nov 2022 17:33:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3095E385222B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669224824; bh=Fk5XRA4wVO4aoq3QdAGyRE5Lz55sYuRroFZJAA7KduI=; h=From:To:Subject:Date:From; b=hNiDvPLCBjNTrjHOGfXntfS9BN80AmFPQmVWnx0tKhNbvqILNwozWJisd0nYFa3ei o+K7N/7aJa1UcXkOzPQMt+tTdJ1W6dMD8cTcDcED+SGrCS2SUsjceJyNYA7mjDdx0J v13XWo7tBHXyGHhIep1ID8Gi6/F27wynDRE4Cxf4= From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107842] New: [avr] Set --param=min-pagesize=0 in the backend Date: Wed, 23 Nov 2022 17:33:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org 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 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107842 Bug ID: 107842 Summary: [avr] Set --param=3Dmin-pagesize=3D0 in the backend Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- The AVR backend should set --param=3Dmin-pagesize=3D0 in v12+, or otherwise= we will see warnings for each and every SFR access like: typedef __UINT8_TYPE__ uint8_t; #define SREG (*(volatile uint8_t*) (0x3F + __AVR_SFR_OFFSET__ )) void bar (void) { SREG =3D 0; } > avr-gcc -c foo-i.c -mmcu=3Datmega8 -Os -Wall foo-i.c: In function 'bar': foo-i.c:7:6: warning: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Warray-bounds] 7 | SREG =3D 0; | ~^~~~~~~~=