On Thu, 30 Nov 2017, Jakub Jelinek wrote: > Hi! > > In this PR Ian complains that the C FE behaves inconsistently > between static var initializers inside of a function and outside of > functions. Apparently we've done that earlier, but only at -O1 and above > where decl_constant_value would be called and in initializers inside of > functions would fold to DECL_INITIAL if other conditions are met, but > outside of functions never. With my recent changes this is the case > also at -O0. > > The following patch allows such folding (in initializers only) also > outside of functions. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK. -- Joseph S. Myers jos...@codesourcery.com