I've already solved it. It was a pretty silly mistake. Now in gcc 5.1.0 the execute and gate methods from otp_pass recive one argument, instead of void. This way the example works: class passAttrChecker : public gimple_opt_pass { public: passAttrChecker(gcc::context* ctxt) : gimple_opt_pass(gimplePass, ctxt) {} bool gate (function *) {...