https://bugs.llvm.org/show_bug.cgi?id=49921
Bug ID: 49921
Summary: llvm::appendToGlobalArray() uses an unqualified
function pointer, even on platforms where it doesn't
make sense
Product: new-bugs
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
`llvm::appendToGlobalArray` (and as a result, `appendToGlobalCtors` and
`appendToGlobalDtors`)
always produce an unqualified function pointer
(c.f.
https://github.com/llvm-project/llvm/blob/master/lib/Transforms/Utils/ModuleUtils.cpp#L31
),
which later leads to the verifier rejecting the generated call with "wrong type
for intrinsic global variable"
for platforms that require a separate address space for functions (e.g. AVR)
(c.f. https://github.com/llvm-project/llvm/blob/master/lib/IR/Verifier.cpp#L651
- checking against a function pointer in the default program address space).
I'm not sure what the process for proposing fixes in llvm is, so I decided to
submit a bug
instead of attempting to make a merge request with a fix.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs