Skip to content

Commit

Permalink
Add a test for the bool name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jiel-nv authored and gmarkall committed Feb 19, 2025
1 parent bca956d commit 56aad6e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions numba_cuda/numba/cuda/tests/cudapy/test_debuginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,23 @@ def test_issue_5835(self):
def f(x):
x[0] = 0

def test_issue_9888(self):
# Compiler created symbol should not be emitted in DILocalVariable
# See Numba Issue #9888 https://github.com/numba/numba/pull/9888
sig = (types.boolean,)
@cuda.jit(sig, debug=True, opt=False)
def f(cond):
if cond:
x = 1
else:
x = 0

llvm_ir = f.inspect_llvm(sig)
# A varible name starting with "bool" in the debug metadata
pat = r'!DILocalVariable\(.*name:\s+\"bool'
match = re.compile(pat).search(llvm_ir)
self.assertIsNone(match, msg=llvm_ir)

@unittest.skip("Wrappers no longer exist")
def test_wrapper_has_debuginfo(self):
sig = (types.int32[::1],)
Expand Down

0 comments on commit 56aad6e

Please sign in to comment.