http://llvm.org/bugs/show_bug.cgi?id=15492
Bug ID: 15492
Summary: CUDA: CodeGenModule::GetGlobalVarAddressSpace can't
handle null VarDecl
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
CodeGenModule::GetOrCreateLLVMGlobal can be used to look up globals without an
associated VarDecl. However, if CUDA is enabled,
CodeGenModule::GetGlobalVarAddressSpace will unconditionally check to see if
the (potentially absent) VarDecl has one of the CUDA address space attributes.
Either there should be an assertion that GetGlobalVarAddressSpace is never
called with a null VarDecl under CUDA, or (more likely) there should be a null
check for the VarDecl.
Found by the static analyzer in r176829.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs