On Wed, 17 Mar 2010, Jakub Jelinek wrote: > On Wed, Mar 17, 2010 at 09:26:29PM +0100, Jakub Jelinek wrote: > > That will very much pessimize debug info. While we are now always in > > -funit-at-a-time mode, that doesn't mean DECL_RTL is computed early enough. > > From the file scope non-static vars, at the point debug info is generated > > only > > the first var usually has DECL_RTL set, all others don't.
But I see no reason why we couldn't compute DECL_RTL early enough. > ... > > And for the dwarf2out.c hunk please see > http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00546.html > > In both spots this happens only for TREE_STATIC && !DECL_EXTERNAL > variables, and the debug info really doesn't care if the alias set will be 0 > on all of those MEMs. Though of course it could use the decl's alias set > if it has been computed already, and 0 otherwise. Well, sure. The hack with overriding flag_strict_aliasing will work, it's still a hack. If we go for it it should be commented as such and be cleaned up properly (I suppose for TREE_STATIC && !DECL_EXTERNAL we can easily just build the MEM manually instead of computing DECL_RTL with all its side-effects). Richard.