In doc/extend.texi we have: int foo () @{ int x = 42; int *y = &x; int result; asm ("magic stuff accessing an 'int' pointed to by '%1'" "=&d" (r) : "a" (y), "m" (*y)); return result; @}
two problems, r != result. Second problem, there should be a : before the output constraint. The current docs on the web site are unchanged. -- Summary: extended asm documentation wrong Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mrs at apple dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35449