Non-smooth function with all differences of translates smooth? Suppose $f:\mathbb{R} \to \mathbb{R}$ has the property that for every fixed $t\in\mathbb{R}$ the function 
$$
 g_t : x \mapsto f(x) - f(x-t)
$$
is $C^\infty(\mathbb{R})$.  Does it follow that $f$ is smooth?
Edit:  The answer is no in generality (see answer below), but what if we impose the condition that $f$ is measurable?
You can translate this as a question in group cohomology: The map $t \mapsto g_t$ is a $1$-cocycle (not assumed continuous) for $\mathbb{R}$ with values in the $\mathbb{R}$-module $C^\infty(\mathbb{R})$ (with translation).  Is the cohomology group $H^1(\mathbb{R}; C^\infty(\mathbb{R}))$ trivial? 
(The question is motivated by a technical point relating to distributions on groupoids, which I won't go into here.)
 A: At least under the axiom of choice the answer is negative: The are discontinuous additive functions $f;\mathbb R \to \mathbb R$ (as far as I remember, that's why Hamel inveted Hamel basis) and for such a function $g_t(x)=f(x)-f(x-t)$ is constant for all $t$.
A: Hamel basis is "not of this world":-)
It becomes more interesting if we make some mild a priori assumption,
like $f\in L^1(R)$, and $g_t^{(n)}\in L^1(R)$.
Then the answer is "yes", $f$ must be smooth.
We apply the Fourier transform. We obtain
$G_t(s)=(1-e^{its})F(s)$. As $g$ is $C^\infty$, we have that $|G_t(s)|\leq K_n|s|^{-n}$,
for every $n$.
Let us prove that $|F|=O(|s|^{-n})$ for an arbitrary fixed $n$.
Let $h(s)=s^nF(s)$. Suppose by contradiction that there is a sequence
$s_k\to\infty$ such that $h(s_k)\to\infty$.
As we have the inequality $|h(s)|\leq |C_t/\sin(st)|$
for ALL $t$, the sequence $s_k$ must have a strange property:
it must be close to ALL arithmetic progressions. 

Does such a sequence exist?
  Precise formulation: does these exist a sequence $s_k\to\infty$ such that for
  every positive $a$ the sequence $S_k=\min_m|s_k-am|$ tends to $0$ ?

No it does not. Suppose it exists, and consider the integrals
$$I_k=\int_1^2 \min_m|s_k-mx|dx.$$
The function under the integral sign is bounded (does not exceed $1$). If our sequence
has the desired property, then $I_k\to 0$ (dominated convergence). But this is a
contradiction because the integrals evidently $\geq 1$.
The argument in the previous paragraph is due to user fedja. 
It follows from this proof that positive measure set of $t$ is enough,
while any countable set
of $t$ is not enough.
EDIT. It is funny what happens if we require bounded support of $f$, in addition to $L^1$.
Then $F$ is an entire function of exponential type, bounded on the real line, so by Bernstein's theorem, $F'$ is bounded and we obtain that $f$ is smooth if $g_t$ is smooth for only ONE value of $t$.
EDIT.

Conjecture: if $f$ is locally $L^1$ and there is a set $E$ of positive measure such
   that $g_t$ are smooth for $t\in E$ then $f$ is smooth. Same is probably true with $E$ of second Baire category.

A: Here's a solution for $f\in L^1_{\mathrm{loc}}$, or even for $f$ a distribution, which avoids Fourier analysis by mollifying.
Let $\phi \in C^\infty_c(\mathbf{R})$ be a smooth bump function of total mass $1$.  Define $\tilde{f} := \phi * f$.  Then $f\in C^\infty(\mathbb{R})$.  Moreover, 
$$
 (f-\tilde{f})(x) = \int (f(x) - f(x-t))\phi(t)dt = \int g_t(x)dt.
$$
So we're done if we can prove that that last integral is convergent in $C^\infty(\mathbb{R})$.  Note that a priori it is only convergent as a distribution.
Here's one way to take care of that last logical point.  A Baire category argument shows that for any $k\in\mathbb{N}$, there is some non-empty interval $[a,b]$ such that the $C^k$-norms of $\{g_t\}_{t\in[a,b]}$ are bounded.  By translation, this is true for any translate of $[a,b]$ as well, and thus for any compact interval.  Arzela-Ascoli, implies that $\{g_t\}_{t\in[a,b]}$ is compact in $C^{k-1}(\mathbb{R})$.  From this and the fact that $t\mapsto g_t$ is weakly smooth, we can deduce that it is continuous in the $C^{k-1}$-topology, for all $k$.
