Suggest trying the FortranCalculus compiler, its freeware! Nothing to loose ... FortranCalculus.info/apps/fc-compiler.html . Are you trying to tweak any parameters in order to find the optimum solution? If so, discontinuous functions may slow the solver down, but should still work.
If your problem is a Initial Value Problem (IVP) then no problem at all. A Boundary Value Problem (BVP) may be slow do to the discontinuous functions.
Across the discontinuity you cannot define the derivative so the problem is in the fact you cannot write the ODE not in the numerical methods.
You you are aware of the position of the discontinuity, you can solve the two regions before and after, using some compatibility relation across the discontinuity. Something similar is used for example in the R-H conditions across a normal shock wave.
The rigorous mathematical treatment of ODEs with discontinuous right is feasible but complex, the classical reference are the works by Filippov in the 60s. From the computational viewpoint, a couple of references are
Article A high accuracy method for solving ODEs with discontinuous r...
Article Sliding Motion in Filippov Differential Systems: Theoretical...