<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dimitry@andric.com" title="Dimitry Andric <dimitry@andric.com>"> <span class="fn">Dimitry Andric</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - static volatile is not honored by the optimizer"
   href="https://llvm.org/bugs/show_bug.cgi?id=30922">bug 30922</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>dimitry@andric.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - static volatile is not honored by the optimizer"
   href="https://llvm.org/bugs/show_bug.cgi?id=30922#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - static volatile is not honored by the optimizer"
   href="https://llvm.org/bugs/show_bug.cgi?id=30922">bug 30922</a>
              from <span class="vcard"><a class="email" href="mailto:dimitry@andric.com" title="Dimitry Andric <dimitry@andric.com>"> <span class="fn">Dimitry Andric</span></a>
</span></b>
        <pre>This is expected, in your example the thing pointed to is volatile, the pointer
itself is not.  You probably intended the following:

static int *volatile VAR;
void FOO() { VAR = 0; }

which compiles to:

FOO:                                    # @FOO
# BB#0:                                 # %entry
    pushl    %ebp
    movl    %esp, %ebp
    movl    $0, VAR
    popl    %ebp
    retl</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>