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

    <tr>
        <th>Summary</th>
        <td>
            -fwrapv-pointer doesn't affect member accesses
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          efriedma-quic
      </td>
    </tr>
</table>

<pre>
    Compile the following with -fwrapv-pointer:

```
struct S { int x,y; };
int *a(struct S *x) { return &x->y; }
```

Produces `getelementptr inbounds nuw %struct.S, ptr %0, i32 0, i32 1`... which seems counter to the premise of -fwrapv-pointer.  And seems like it might be a problem with https://github.com/llvm/llvm-project/pull/130742 .

CC @dtcxzyw @nikic
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUkk9vpDwMxj-NuViDgoFhOHBgpu-cX6mfAIKBbEPC5k-Z7qdfQbuttreVLMWK4_h5fnLnvZoMcwPlFcqnpIthtq7h0Skelu70MyqZ9HZ4a252WZVmDDPjaLW2mzITbirMeBo3162vp9UqE9hB3oI44iw-QrQ-uCgDPiNUV1Qm4APo9gb5FaF6gvwKot1vgdoO6PL1mtoHUH10OQ7RGQQ6P06Q__fZ_PcgEO3_zg5Rskc4i4kDa17YhDU4VKa30QweTdwQqHyfkz4D3XCvA5Viz1VO-JlkcBZpmuI2KzmjZ148Sht3qxjsAWR1vCjPaMfvMFLE1gwfXVq9MKqAi5rmgD1jh6uzveblHeQcwup3fHQHuk8qzLFPpV2A7lq__jlOq7M_WAag-xq1BrpnuagKwvTd_u2GUIghyMevt21PjXpRMhmafKjzuku4yaqCygsVlyKZG8lSVueir6q670hyXdbMZTnyechyLrJENSSoFDll2aXIqEhrUZZSyovIc3muygEKwUundLqrS62bEuV95CbLqSjqRHc9a39sGJHhDY8qEO0L55rDUh8nD4XQygf_9U1QQXPzjSgOlr0BqgJ248gy4MJLzw47Kdl79kl0uvlnlIcof8A8VL829DsAAP__HZD6zQ">