This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/56439] global and local register variables don't work in a useful way -- AVR
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Feb 2013 03:53:25 +0000
- Subject: [Bug target/56439] global and local register variables don't work in a useful way -- AVR
- Auto-submitted: auto-generated
- References: <bug-56439-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56439
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-02-25 03:53:25 UTC ---
(In reply to comment #2)
> Any specific sections you can point me to? I'd be interested to hear a
> justification for this behavior.
Simple answer, an interrupt can happen any time after the access/assignment of
the global register variable so it needs to be set to the value and treated as
a volatile variable.