The Compiler does not do register- and constant tracing on volatile or absolute global objects. Accesses to volatile or absolute global objects are not eliminated. See the following listing for one reason to use a volatile declaration.
volatile int x; void main(void) { x = 0; ... if (x == 0) { // without volatile attribute, the // comparison may be optimized away! Error(); // Error() is called without compare! } }