[Bug optimization/11381] [3.3/3.4 regression] volatile memory access optimized away

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Mon Jun 30 16:36:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Priority|P2                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-30 16:36:04
               date|                            |
            Summary|[regression] volatile memory|[3.3/3.4 regression]
                   |access optimized away       |volatile memory access
                   |                            |optimized away
   Target Milestone|3.4                         |3.3.1


------- Additional Comments From bangerth at dealii dot org  2003-06-30 16:36 -------
Confirmed, a regression in 3.3 and mainline w.r.t. 3.2. Here's another 
work-around:
---------------------------
void
flash_wait_ready(unsigned * volatile vaddr)
{
    while (*vaddr != *vaddr)
        ;
}
---------------------------

I must admit that I think that this one is wrong, though, as it
makes the _pointer_ volatile, not the object pointed to.

W.



More information about the Gcc-bugs mailing list