Re: How to understand the "memory" and the volatile keyword?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Moved to gcc0help.

On 29/01/17 15:56, parmenides via gcc wrote:
> It is obvious that every variables are cached into register, and even 
> though the 'sum' is used after the barrier, it does not written back to 
> its memory location and read again. I think my idea about the "memory" 
> and the volatile keyword must be misunderstanding. Any suggestion?

The memory must be reachable: unless an auto variable has its address
taken it cannot be reached from the asm.  There are no reachable
memory operands in your program.

Andrew.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux