<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/113678>113678</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [MLIR][EmitC] How to assign a value to the location pointed by the pointer?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          LittleMeepo
      </td>
    </tr>
</table>

<pre>
    How to assign a value to the location pointed by the pointer?
Like `*p = 4`

```
%1 = emitc.apply "*" (%0)  // %0 is pointer type.
emitc.assign %2 to %1
```

Then will get an error when verifying AssignOp:
```
    return emitOpError() << "requires first operand (" << variable
                         << ") to be a get_global, member, member of pointer, "
 "subscript or variable";
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykUs2OmzAQfprhMtoIhjiBA4dsslEr7WqlqvfKhgHcGkxtk1XevjJkG6nKrQgNzDB8P_InvdfdyFyBeAZxSuQceuuqVx2C4TfmySbKNtfqi_3AYHFdR4kXaWaOk9AzGlvLoO2Ik9Vj4AbVdZmvrYP8DOkJ0sOr_sUIuxToMCHkJ9zGZvl0q7v0dq8tiWzZ40GHeiOnyVwRiIAOQIRABZBIgUpEoDPQGWOP2n8yY7hOvFnBbhirASBBUX1keEy91O89j_ihjcGOA8oR2Tnr8COOL-x0e9Vjh4cF832C_LENRETHYXbjYuR9eokoi_oSIT9CfoyuHP-etWOPrXY-oJ3YybFZXdLn3kU6LZXhO_LD644aOYJFxSijiR-dsUoaoCMOPCh29ze07d8To_XflQSI_Kx87fQU0Lq7BiLIn_-xnDRV3pR5KROusj2VhdiXokj6quCd3LdFSUJJtaO2aZSqs1q2O6LtVjaJriilbZaSyCgVotjUjcqF3GeNzETdtC1sUx6kNhtjLsPGui7R3s9cZVm-2xeJkYqNX4JMNBjtoj5xSlwV95_U3HnYpkb74O8IQQezhP_t9es3ECcQzy-DDkcQJ_zPzCezM1UfwuRjMJZ8djr0s9rUdgA6Rw23x9Pk7E-uA9B5seSBzjdXl4r-BAAA__-EthSs">