Can't use Timer with GCC optimizations disabled

I’m trying to debug my application, but after disabling optimizations with:

#pragma GCC optimize ("O0")

I got the flowing error:

{...}/.particle/toolchains/gcc-arm/5.3.1/arm-none-eabi/include/c++/5.3.1/functional: In substitution of 'template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = void (*)(); <template-parameter-1-2> = void; <template-parameter-1-3> = <missing>]':
{...}/HEM_CCU.cpp:92:47:   required from here
{...}/.particle/toolchains/gcc-arm/5.3.1/arm-none-eabi/include/c++/5.3.1/functional:2053:9: internal compiler error: in strip_typedefs, at cp/tree.c:1381
         typename = _Requires<_Callable<_Functor>, void>>

The code at line 92:47 is the folowing:
Timer *fsm_tick = new Timer(1000, FSM_TICK);

If I comment out this line it compiles fine. Any ideas on how I can debug without optimizations and still use the Timer?

What about this one @ScruffR, any ideias?