In a book from differential equations I found the following theorem, without proof and references:
Let functions $f, g: R \rightarrow R$ be continuous and $2\pi$-periodic and let $m\in N$. Assume that $$\frac{a_0}{2}+\sum_{n=1}^\infty (a_n \cos nx+b_n \sin nx),$$ $$\frac{A_0}{2}+\sum_{n=1}^\infty (A_n \cos nx+B_n \sin nx)$$ be Fourier series of $f$ and $g$ respectively, not neceserilly convergent to $f$ and $g$.
Assume that $a_0=0$ and $$(\frac{A_0}{2})^{(m)}+\sum_{n=1}^k (A_n \cos nx+B_n \sin nx)^{(m)}=\frac{a_0}{2}+\sum_{n=1}^k (a_n \cos nx+b_n \sin nx)$$ for all $x \in R$, $k\in N$. Then $g$ is of class $C^m$ and $g^{(m)}=f$.
Maybe proof of references of this theorem.