I don't think this it is the fault of patent law that companies do not fund basic research. I think is it just the fact that it is very hard to profit from basic research, fundamentally. If anything, patent law (for all its faults) at least tries to create some incentives.
One current problem is that this is that the results are not always available to society at large; I've seen a lot of stories on HN about attempts to change that.
"Since the benefits of scientific advances are consumed by everyone, no individual has a strong financial incentive to invest in basic research."
Related to this point, patent law causes companies to focus more on efforts that lead to patentable inventions, and therefore away from basic science, which is unpatentable.