diff --git a/dace/codegen/control_flow.py b/dace/codegen/control_flow.py index 87a043b4db..a9fbc35db6 100644 --- a/dace/codegen/control_flow.py +++ b/dace/codegen/control_flow.py @@ -391,10 +391,10 @@ def as_cpp(self, codegen, symbols) -> str: update = f'{self.itervar} = {self.update}' expr = f'{preinit}\nfor ({init}; {cond}; {update}) {{\n' - expr += _clean_loop_body(self.body.as_cpp(codegen, symbols)) - expr += '\n}\n' # TODO: Check that the dot is used to access struct members expr = expr.replace('.', '->') + expr += _clean_loop_body(self.body.as_cpp(codegen, symbols)) + expr += '\n}\n' return expr @property