> 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)
> 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)
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);
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