# This file contains tests that exercise multiple AST nodes import tempfile from sympy.external import import_module from sympy.printing.codeprinter import ccode from sympy.utilities._compilation import compile_link_import_strings, has_c from sympy.utilities._compilation.util import may_xfail from sympy.testing.pytest import skip from sympy.codegen.ast import ( FunctionDefinition, FunctionPrototype, Variable, Pointer, real, Assignment, integer, CodeBlock, While ) from sympy.codegen.cnodes import void, PreIncrement from sympy.codegen.cutils import render_as_source_file cython = import_module('cython') np = import_module('numpy') def _mk_func1(): declars = n, inp, out = Variable('n', integer), Pointer('inp', real), Pointer('out', real) i = Variable('i', integer) whl = While(i