This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18798] New: global register variable: register is used for function calls
- From: "lts-rudolph at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Dec 2004 21:05:28 -0000
- Subject: [Bug c/18798] New: global register variable: register is used for function calls
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If the c code contains a global register variable the compiler generate wrong
code. gcc uses the global register var for function calls but will not save
them on stack before using them. Only register vars from r10 to r18
affected. Registers lower then 10 seem OK.
Problem occures when:
avr-gcc -O3 -g -mmcu=at90s8515 -c main.c
avr-gcc -O3 -g -mmcu=at90s8515 main.o -o go
I hope the next page give me the chance to add the source :-)
--
Summary: global register variable: register is used for function
calls
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lts-rudolph at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-linux-gnu
GCC target triplet: avr-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18798