title: Linux assembler error "impossible constraint in ‘asm’"
body: <p>I'm starting with assembler under Linux. I have saved the following code as testasm.c<br>
  and compiled it with: gcc testasm.c -otestasm<br>
  The compiler replies: "impossible constraint in ‘asm’".</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main(void)
  {
      int foo=10,bar=15;
  
      __asm__ __volatile__ ("addl %%ebx,%%eax"
          : "=eax"(foo) 
          : "eax"(foo), "ebx"(bar) 
          : "eax" 
      );
  
      printf("foo = %d", foo);
  
      return 0;
  }
  </code></pre>
  
  <p>How can I resolve this problem?
  (I've copied the example from <a href="http://asm.sourceforge.net/articles/linasm.html#InlineASM" rel="noreferrer">here</a>.)</p>
  
  <p>Debian Lenny, kernel 2.6.26-2-amd64<br>
  gcc version 4.3.2 (Debian 4.3.2-1.1)</p>
  
  <p><strong>Resolution</strong>:<br>
  See the accepted answer - it seems the 'modified' clause is not supported any more.</p>