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

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

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

Visibility: public

Requested revision: db936b909471f5c7e0344489ab1e7d59ab387658

Requested commit: db936b909471f5c7e0344489ab1e7d59ab387658

Commit: db936b909471f5c7e0344489ab1e7d59ab387658

Tree: 733ceb4aaa6906ab70e1efab581a98b22bdfe50b

Author: mlugg

Committer: Alex Rønne Petersen

## 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

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

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