public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107842] New: [avr] Set --param=min-pagesize=0 in the backend
@ 2022-11-23 17:33 gjl at gcc dot gnu.org
2022-11-23 17:49 ` [Bug target/107842] " gjl at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: gjl at gcc dot gnu.org @ 2022-11-23 17:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107842
Bug ID: 107842
Summary: [avr] Set --param=min-pagesize=0 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=min-pagesize=0 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 = 0;
}
> avr-gcc -c foo-i.c -mmcu=atmega8 -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 = 0;
| ~^~~~~~~~
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/107842] [avr] Set --param=min-pagesize=0 in the backend
2022-11-23 17:33 [Bug target/107842] New: [avr] Set --param=min-pagesize=0 in the backend gjl at gcc dot gnu.org
@ 2022-11-23 17:49 ` gjl at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: gjl at gcc dot gnu.org @ 2022-11-23 17:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107842
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Dupe, but I don't know wheter only AVR is annoyed by this.
*** This bug has been marked as a duplicate of bug 105523 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-23 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 17:33 [Bug target/107842] New: [avr] Set --param=min-pagesize=0 in the backend gjl at gcc dot gnu.org
2022-11-23 17:49 ` [Bug target/107842] " gjl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).