https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78868
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- It is the call to printf and the order of evaluation of its arguments. That is take: F (g (), h ()); g or h could be called first. The same thing is true here.