Issue 132449
Summary -fwrapv-pointer doesn't affect member accesses
Labels new issue
Assignees
Reporter efriedma-quic
    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
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to