Commit d927f347de

Wink Saville <wink@saville.com>
2018-08-08 05:18:26
Fix ir_analyze_instruction_atomic_rmw (#1351)
There were two tests of type_is_valid(casted_ptr->value.type) change the second one to type_is_valie(casted_operand->value.type).
1 parent a583beb
Changed files (1)
src
src/ir.cpp
@@ -20591,7 +20591,7 @@ static TypeTableEntry *ir_analyze_instruction_atomic_rmw(IrAnalyze *ira, IrInstr
         return ira->codegen->builtin_types.entry_invalid;
 
     IrInstruction *casted_operand = ir_implicit_cast(ira, operand, operand_type);
-    if (type_is_invalid(casted_ptr->value.type))
+    if (type_is_invalid(casted_operand->value.type))
         return ira->codegen->builtin_types.entry_invalid;
 
     AtomicOrder ordering;