diff options
| author | LemonBoy <LemonBoy@users.noreply.github.com> | 2020-04-23 18:44:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-23 12:44:16 -0400 |
| commit | e6428f94013132b6a6284b053afb36d35af63c59 (patch) | |
| tree | 86275c7d4d6c0729a0905e4e9e2abca1371f1fed /src-self-hosted/Module.zig | |
| parent | 58d5c37409a7fc7fea2d6c536bf53c0193c5266a (diff) | |
| download | zig-e6428f94013132b6a6284b053afb36d35af63c59.tar.gz zig-e6428f94013132b6a6284b053afb36d35af63c59.zip | |
stage1: Fix bitcast of immediate to ptr type (#5131)
Consider a (legal according to the `@bitCast` rules) conversion from u16
to [2]u8: since the former is a scalar and the latter is a pointer
(arrays are represented at pointers in the codegen phase) we have to
allocate a temporary slot on the stack and then bitcast the resulting
pointer to the desired destination type.
Beware that this means the lifetime of the resulting value is the same
of the function it's contained in and for all intents and purposes
should be regarded as a local (eg. it should not escape).
Closes #4395
Closes #5121
Diffstat (limited to 'src-self-hosted/Module.zig')
0 files changed, 0 insertions, 0 deletions
