diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-12-20 09:44:10 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-20 15:47:43 -0500 |
| commit | f077c3c4ccd03f48f785ee812ab2c88c85792014 (patch) | |
| tree | c7b83ad5642f4064c200a9feade04bfb3134e3ad /src/ir.cpp | |
| parent | 9daa7e1e193a693b4415d3db8031633236f28876 (diff) | |
| download | zig-f077c3c4ccd03f48f785ee812ab2c88c85792014.tar.gz zig-f077c3c4ccd03f48f785ee812ab2c88c85792014.zip | |
Fix comptime evaluation of runtime array access
Fix #3951
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index bc16cef561..0c7160fa80 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -19500,6 +19500,7 @@ static IrInstruction *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruct } if (orig_array_ptr_val->special != ConstValSpecialRuntime && + orig_array_ptr_val->data.x_ptr.special != ConstPtrSpecialHardCodedAddr && (orig_array_ptr_val->data.x_ptr.mut != ConstPtrMutRuntimeVar || array_type->id == ZigTypeIdArray)) { |
