diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-04-28 17:53:06 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-04-28 17:53:06 -0400 |
| commit | 96ecb402590df7a02526009f1630f27e14a0e77c (patch) | |
| tree | 7c9816d48aec59f73228d474c67b682dfde9038b /src/ir.cpp | |
| parent | 4ac36d094c06b04c1c71d972d3f3e1187bccea95 (diff) | |
| download | zig-96ecb402590df7a02526009f1630f27e14a0e77c.tar.gz zig-96ecb402590df7a02526009f1630f27e14a0e77c.zip | |
add fuzz tests for std.atomic.Stack
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 4bf8240472..469900bf07 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -18184,6 +18184,11 @@ static TypeTableEntry *ir_analyze_instruction_atomic_rmw(IrAnalyze *ira, IrInstr } else { if (!ir_resolve_atomic_order(ira, instruction->ordering->other, &ordering)) return ira->codegen->builtin_types.entry_invalid; + if (ordering == AtomicOrderUnordered) { + ir_add_error(ira, instruction->ordering, + buf_sprintf("@atomicRmw atomic ordering must not be Unordered")); + return ira->codegen->builtin_types.entry_invalid; + } } if (instr_is_comptime(casted_operand) && instr_is_comptime(casted_ptr) && casted_ptr->value.data.x_ptr.mut == ConstPtrMutComptimeVar) |
