[Bug inline-asm/94183] New: If constraints allow but only memory, expression should be an lvalue

frederic.recoules@univ-grenoble-alpes.fr gcc-bugzilla@gcc.gnu.org
Sun Mar 15 18:59:27 GMT 2020


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

            Bug ID: 94183
           Summary: If constraints allow but only memory, expression
                    should be an lvalue
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: inline-asm
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frederic.recoules@univ-grenoble-alpes.fr
  Target Milestone: ---

In the file gimplify.c in the function gimplify_asm_expr, it is said:
/* If the operand is a memory input, it should be an lvalue.  */

The fact is that it is documented nowhere in the online documentation.

I would stand to be corrected on that, but it is my understanding that the "m"
constraint alone is "point me to the address of the lvalue whatever its value"
while "m" with a register constraint is "give me the value of the expression in
the memory whatever its address".

If I am right and it is principled, it is very important to document it.


More information about the Gcc-bugs mailing list