# compiler: fix comptime memory store bugs · gitcafe/zig

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

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

Visibility: public

Requested revision: f83fe2714bd4441610156e1a6017d07409ad6093

Requested commit: f83fe2714bd4441610156e1a6017d07409ad6093

Commit: f83fe2714bd4441610156e1a6017d07409ad6093

Tree: ace9b73ebcc5dec94488312d8078f62822849a08

Author: mlugg

Committer: Matthew Lugg

## Message

```
compiler: fix comptime memory store bugs

* When storing a zero-bit type, we should short-circuit almost
  immediately. Zero-bit stores do not need to do any work.
* The bit size computation for arrays is incorrect; the `abiSize` will
  already be appropriately aligned, but the logic to do so here
  incorrectly assumes that zero-bit types have an alignment of 0. They
  don't; their alignment is 1.

Resolves: #21202
Resolves: #21508
Resolves: #23307

```

## Parents

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

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