http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39375
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-02 04:16:52 UTC --- __asm__ ("xxx" : "+X" (sum)); Is most likely what you want to use. This says the sum might be clobbered but it might not be as the same value is used if it was not.