Let $I$ be an open interval, $f:I\rightarrow \mathbb{R}$ be a convex function and $g:I\rightarrow \mathbb{R}$ increasing. Then, $g(x^-), g(x^+)$, $f'_-(x)$ and $f'_+(x)$ exist, for all $x\in I$. Now, assume that the following inequalities hold \begin{equation} g(x^-)\leq f'_-(x)\leq g(x)\leq f'_+(x)\leq g(x^+)\;\; ;\;\; x \in I. \end{equation} For example, the functions $f(x)=|x|$ and $g(x)=\mbox{sgn}(x)$ satisfy all the above conditions ($I=\mathbb{R}$).
Putting $I_g:=\{x\in I: g\mbox{ is continuous at } x\}$ and $I_f:=\{x\in I: f\mbox{ is differentiable at } x\}$ we have $I_g\subseteq I_f$ and $f'(x)=g(x)$ on $I_f$.
Now, we are looking for such functions $f$ and $g$ such that $I_f\neq I_g$.
Also, some examples such that $g(x^+)\neq f'_+(x)$ but $g(x^-)= f'_-(x)$, for some $x\in I$ (and similarly $g(x^-)\neq f'_-(x)$ but $g(x^+)=f'_+(x)$, for some $x\in I$).
Thanks in advance.
The condition $$ g(x^-)\leq f'_-(x)\leq g(x)\leq f'_+(x)\leq g(x^+) $$ for all $x \in I$ implies that in fact $$ \tag{*} f'_+(x) = g(x^+) \text{ and } f'_-(x) = g(x^-) $$ for all $x \in I$, so that $f$ is differentiable exactly at the points where $g$ is continuous, i.e. the sets $I_f$ and $I_g$ are identical.
Proof: For fixed $x < y$ consider the function $$ h(t) = f(t) - \frac{f(y)-f(x)}{y-x}(t-x) $$ which has the left derivative $$ h'_-(t) = f'_-(t) - \frac{f(y)-f(x)}{y-x} \, . $$ We have $h(x) = h(y)$ so that $h$ attains its minimum on the interval $[x, y]$ at some point $t_0$ with $x < t_0 \le y$. Then $h'_-(t_0) \le 0$ so that $$ \frac{f(y)-f(x)}{y-x} = f'_-(t_0) - h'_-(t_0) \ge f'_-(t_0) \ge g(t_0^-) \ge g(x^+) \, . $$ Taking the limit $y \to x^+$ we conclude that $f'_+(x) \ge g(x^+)$. This proves the first equality in $(*)$, the second one can be proved in the same way.
Remarks: