diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2020-04-01 20:42:43 +0200 |
|---|---|---|
| committer | Timon Kruiper <timonkruiper@gmail.com> | 2020-04-01 20:50:13 +0200 |
| commit | d33766e6c7289b79256b2e50d0dc2344729ff710 (patch) | |
| tree | 24da3981755618f82cfec5da88ebe5df791a708b /src/analyze.cpp | |
| parent | ae6965a4e73cd5aad04e1c6831f48e7f0ecafc04 (diff) | |
| download | zig-d33766e6c7289b79256b2e50d0dc2344729ff710.tar.gz zig-d33766e6c7289b79256b2e50d0dc2344729ff710.zip | |
Make sure that ZigTypeVector and ZigTypeArray have the same memory layout
Throughout the stage1 code it is assumed that these have the same layout,
but that was not the case. This caused an issue on 32-bit hardware.
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index df7bcdf9de..45983e5d38 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -5156,6 +5156,7 @@ ZigType *get_vector_type(CodeGen *g, uint32_t len, ZigType *elem_type) { } entry->data.vector.len = len; entry->data.vector.elem_type = elem_type; + entry->data.vector.padding = 0; buf_resize(&entry->name, 0); buf_appendf(&entry->name, "@Vector(%u, %s)", len, buf_ptr(&elem_type->name)); |
