title: Label moving after optimization is turned on in gcc
body: <p>I have a strange problem after turning on level 1 optimization in gcc. What I do is save the label and jmp back to it from a different function later.</p>
  
  <pre><code>void
  UMS__suspend_procr( VirtProcr *animatingPr )
  { 
     animatingPr-&gt;nextInstrPt = &amp;&amp;ResumePt;
  
  
     [Some Code and inline volatile asm]
  
     ResumePt:
     return;
  </code></pre>
  
  <p>}</p>
  
  <p>I do some of these jumps and they all work fine.
  The problem is that when I turn on O1 it does not save the right label address. Instead it does this:</p>
  
  <pre><code>804b14e:       8b 45 08                mov    0x8(%ebp),%eax
  804b151:       c7 40 14 4e b1 04 08    movl   $0x804b14e,0x14(%eax)
  804b158:       8b 55 08                mov    0x8(%ebp),%edx
  </code></pre>
  
  <p>So the program is jumping back even before the assignment.</p>