On 08/21/2015 05:51 AM, k9119911 wrote: > I think lang_hooks.decls.pushdecl(var) can only be used in front-end, so how > can I declare > > a global variable in middle-end? Probably, tree-profile.c (e.g. init_ic_make_global_vars) contains some code that could be used as an example. -- Regards, Mikhail Maltsev