I need a solution to this problem (which is really a calculus problem) in order to prove a rigidity result for open nonnegatively curved manifolds with odd-dimensional souls:

Suppose that $f,g:\mathbf{R}\rightarrow \mathbf{R}$ are smooth functions. Assume that $f(0)=0$ and that $g(t)$ has a global maximum at $t=0$. Assume for all $t\in\mathbf{R}$ that: $$f'(t)^2 \leq f(t)^2 + g''(t).$$ Prove that $f$ and $g$ must both be constant functions.

By the way, this is simple to prove if $g$ is analytic. In this case, the fact that $g$ has a global maximum implies that $g''(t)\leq 0$ on an interval about $t=0$. So you have $f'(t)^2\leq f(t)^2$ which implies that $f(t)=0$ on this interval (establishing the result on an interval is enough).