From 57dc838580b2153494bb4d003ca5ab723cf411b2 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 19 Jan 2018 18:22:32 -0600 Subject: [PATCH] Mark global-scope temporaries static for C-family backends --- loopy/target/c/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loopy/target/c/__init__.py b/loopy/target/c/__init__.py index 25a8e29ba..f4b124303 100644 --- a/loopy/target/c/__init__.py +++ b/loopy/target/c/__init__.py @@ -715,7 +715,8 @@ class CASTBuilder(ASTBuilderBase): return decl def wrap_global_constant(self, decl): - return decl + from cgen import Static + return Static(decl) def get_value_arg_decl(self, name, shape, dtype, is_written): assert shape == () -- GitLab