A well-known theorem in topology says that for a smooth manifold $M$ of dimension $n$ the map $f: M \rightarrow point$ satisfies
$$f^! \mathbf R = \mathbf R[n]$$
Here $\mathbf R$ is the constant sheaf.


Here is my question: is there any kind of converse statement to this? (I.e. if $f$ is such that the above equation holds, is $M$ smooth? I don't expect this implication to hold literally, any partial or weakened statement is OK, too.)



smooth manifold vs. exceptional inverse image
Let $X$ be a homology sphere which is not homotopic to a sphere. (For example, the Poincare $3$-sphere.) Denote by $M$ the suspension of $X$. Then I believe that $f^!\mathbb{R}=\mathbb{R}[4]$, yet $M$ is not even a topological manifold. (Homologically one cannot distinguish $M$ from a $4$-manifold.)


