The store instruction fails as it is unable to process the function as a pointer in its operand. What class object is a function pointer going to be (if such a class already exists) and if it does not inherit from Value class, can it?
Sorry for delay. I could not grasp the sense of your question so I investigated the bug instead. The fix is a two-liner so I took the liberty of committing it to avoid wasting your time on it, https://reviews.llvm.org/rGdc553ce646cd.
If I understand the question correctly, the answer is llvm::Function derives from llvm::Constant so you can cast from the latter to the former using dyn_cast and then use mlir::SymbolRefAttr to refer to the function.