# ir: Avoid constant-folding ptr to sentinels · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c1cc1ebc35f7a56669db2f88b6d4ff8f1603ec59)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c1cc1ebc35f7a56669db2f88b6d4ff8f1603ec59

Requested commit: c1cc1ebc35f7a56669db2f88b6d4ff8f1603ec59

Commit: c1cc1ebc35f7a56669db2f88b6d4ff8f1603ec59

Tree: 17e1064c3d862df1bed5ea4f2e73d789afb1893f

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
ir: Avoid constant-folding ptr to sentinels

Constant-folding the pointers to the expected sentinel value have some
big problems: it hides the real content of the array, makes the pointer
to the sentinel point to a completely different memory region and treats
it like a const value even when the underlying array is mutable.

Fixes #4840

```

## Parents

- [8cad45349510b2995a49fc907bdc3c8bf86aa21b](https://git.cafe/gitcafe/zig/commit/8cad45349510b2995a49fc907bdc3c8bf86aa21b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c1cc1ebc35f7a56669db2f88b6d4ff8f1603ec59?format=markdown)
