...
If an attempt is made to refer to an object defined with a volatile-qualified type through use of an lvalue with non-volatile-qualified type, the behavior is undefined.
(See also undefined behavior 65 in Annex J of the C Standard.)
Noncompliant Code Example
...