Skip to content

Commit c78d41f

Browse files
committed
compiler: Hotfix CallFromPointer
1 parent 33c3b12 commit c78d41f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎devito/symbolics/extended_sympy.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ def base(self):
263263
def bound_symbols(self):
264264
return {self.call}
265265

266+
@property
267+
def canonical_variables(self):
268+
# `call` is bound to keep it out of `free_symbols`, but it names a C
269+
# call or member and therefore must not be canonicalized by SymPy
270+
return {}
271+
266272
@property
267273
def free_symbols(self):
268274
return super().free_symbols - self.bound_symbols

‎tests/test_symbolics.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ def test_field_from_composite():
306306
# Test reconstruction
307307
ffc3 = ffc0.func(*ffc0.args)
308308
assert ffc0 == ffc3
309+
assert ffc1.as_dummy() == ffc1
309310

310311
# Free symbols
311312
assert ffc1.free_symbols == {s}

0 commit comments

Comments
 (0)