public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54494] New: Missing store to volatile
@ 2012-09-05 17:47 pinskia at gcc dot gnu.org
  2012-09-05 17:48 ` [Bug tree-optimization/54494] [4.7/4.8 Regression] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-05 17:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494

             Bug #: 54494
           Summary: Missing store to volatile
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pinskia@gcc.gnu.org


Consider:

extern const unsigned long base;
static inline void wreg(unsigned char val, unsigned long addr)
{
   *((volatile unsigned char *) (base + addr)) = val;
}
void wreg_twice(void)
{
   wreg(0, 42);
   wreg(0, 42);
}
---- CUT ---
At -O2 the second store to the volatile char is removed by the strlen pass.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-09-06 13:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
2012-09-05 17:48 ` [Bug tree-optimization/54494] [4.7/4.8 Regression] " pinskia at gcc dot gnu.org
2012-09-05 18:03 ` pinskia at gcc dot gnu.org
2012-09-05 18:24 ` pinskia at gcc dot gnu.org
2012-09-05 20:07 ` ralf@linux-mips.org
2012-09-06  4:12 ` pinskia at gcc dot gnu.org
2012-09-06  8:08 ` pinskia at gcc dot gnu.org
2012-09-06  8:09 ` [Bug tree-optimization/54494] [4.7 " pinskia at gcc dot gnu.org
2012-09-06  8:09 ` pinskia at gcc dot gnu.org
2012-09-06 13:52 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia 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).