The following is not really an answer (which is given in t.b.'s 2nd contribution to the comments to your question), but rather it gives some results that are of related interest.
It is even possible to define an everywhere (finitely) differentiable function $g$ that has any specified countable set as the set on which $g$ has strict local maxima. See Blazek/Borák/Malý  (freely available on the internet) and Katznelson/Stromberg  for very detailed constructions of such functions. Of course, this can't happen if the function is $C^1$ on any interval, so any such function is an example of an everywhere differentiable function whose derivative has a dense set of discontinuities. Curiously, in the Baire category sense, most everywhere (finitely) differentiable functions on a specified interval have strict local maxima on a (countably) dense subset of that interval and strict local minima on a (countably) dense subset of that interval. See Weil  for the details. This is strengthened in Weil , where it is shown that most bounded derivatives on $[0,1]$ are discontinuous on a set whose relative complement has Lebesgue measure zero. (Note that this is stronger than is needed for the derivative to not be Riemann integrable on any subinterval of $[0,1],$ since for this we only need the discontinuities to have positive measure on every subinterval.) In contrast to this, recall that every derivative is continuous on the complement of a first category set, since every derivative is a Baire $1$ function. In Bruckner/Petruska  (Theorem 2.4) this result for most bounded derivatives on $[0,1]$ is strengthened to "on a set whose relative complement has $\mu$-measure zero" for any specified finite Borel measure $\mu,$ and in Kirchheim  (Theorem 2) this result for most bounded derivatives on $[0,1]$ is strengthened to "on a set whose relative complement has Hausdorff $h$-measure zero" for any specified Hausdorff measure function $h.$ Note that these last results give an abundance of examples such that $[0,1] = A \cup B$, where $A$ is about as small as you can ever desire from a measure standpoint and $B$ is as large as possible from a Baire category standpoint. Simply take any Baire typical bounded everywhere differentiable function $f$ and let $A = C(f)$ be the continuity set of $f'$ and let $B = D(f)$ be the discontinuity set of $f'$. And, of course, by using a countable union of appropriate translations of any such decomposition of $[0,1]$, we get an analogous decomposition for $\mathbb R.$
 Jiri Blazek, Emil Borák, and Jan Malý, On Köpcke and Pompeiu functions, Casopis Pro Pestování Matematiky 103 (1978), 53-61.
 Yitzhak Katznelson and Karl Robert Stromberg, Everywhere differentiable, nowhere monotone, functions, American Mathematical Monthly 81 (1974), 349-354.
 Clifford Edward Weil, On nowhere monotone functions, Proceedings of the American Mathematical Society 56 (1976), 388-389.
 Clifford Edward Weil, The space of bounded derivatives, Real Analysis Exchange 3 (1977-78), 38-41.
 Andrew Michael Bruckner and György Petruska, Some typical results on bounded Baire $1$ functions, Acta Mathematica Hungarica 43 (1984), 325-333.
 Bernd Kirchheim, Some further typical results on bounded Baire one functions, Acta Mathematica Hungarica 62 (1993), 119-129.