Re: [patch] Streamline debug info for up-level references

2018-06-18 Thread Eric Botcazou
> Looks good to me. Rather than removing dwarf2/pr37726.c can you try > turning that into a guality test that verifies the debug experience is the > same (or better) than before? I realize guality stuff is fragile but you > can restrict it to -O0 if you like (not sure if dg-skip-if supports that)

Re: [patch] Streamline debug info for up-level references

2018-06-17 Thread Eric Botcazou
> Looks good to me. Rather than removing dwarf2/pr37726.c can you try > turning that into a guality test that verifies the debug experience is the > same (or better) than before? I realize guality stuff is fragile but you > can restrict it to -O0 if you like (not sure if dg-skip-if supports that)

Re: [patch] Streamline debug info for up-level references

2018-06-15 Thread Richard Biener
On Fri, Jun 15, 2018 at 12:50 PM Eric Botcazou wrote: > > Hi, > > the motivating example is the following program in GNU C: > > void foo (int len) > { > int a = 1; > int b[len]; > > void bar (void) > { > b[0] = a; > a++; > } > > bar (); > } > > int main (void) > { > foo (4);

[patch] Streamline debug info for up-level references

2018-06-15 Thread Eric Botcazou
Hi, the motivating example is the following program in GNU C: void foo (int len) { int a = 1; int b[len]; void bar (void) { b[0] = a; a++; } bar (); } int main (void) { foo (4); } If you look at the debug info at -O0 -g, you'll see that that the compiler generates 2 DIE