nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

[LLVM] Fix constraint for the atomic: Only assignment is supported for CodegenAtomicStatement

Open pramodk opened this issue 3 years ago • 1 comments

See the https://github.com/BlueBrain/nmodl/pull/645#issuecomment-1095075632:

libc++abi: terminating with uncaught exception of type std::runtime_error:
              Error: only assignment is supported for CodegenAtomicStatement

The reason is that mech->ion_ina[ion_ina_id] += mech->ina[id] uses + with CodegenAtomicStatement.

As mentioned there, a += b can be written as a = a + b, and hence this error is not quite right.

Currently, we have to write verbose code due to this error message. Maybe this could be fixed with minimum effort?

pramodk avatar Apr 27 '22 22:04 pramodk

By the way, this is not a blocker!

pramodk avatar Apr 27 '22 23:04 pramodk