[Bug inline-asm/100921] Inline assembly use of struct not counted as use for store elision

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 5 05:03:52 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100921

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
__asm__ __volatile__("call consumer" : : "D"(&v));

You are just passing the address of the variable.  You either need "m"(v)
there, a simple "memory" might work too.

See PR 36639, and PR 93952.  There are others.


More information about the Gcc-bugs mailing list