On Thu, 30 Jul 2020, Andreas Schwab wrote: > On Jul 30 2020, Richard Biener wrote: > > > diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-1.c > > b/gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-1.c > > new file mode 100644 > > index 00000000000..ede30f9a95e > > --- /dev/null > > +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-1.c > > @@ -0,0 +1,17 @@ > > +/* { dg-do compile } */ > > +/* { dg-options "-g -gdwarf -dA" } */ > > + > > +extern void foo (int); > > +extern void bar (int); > > + > > +int main() > > +{ > > + foo (1); > > +} > > + > > +/* We want subprogram DIEs for both foo and main and a DIE for > > + the formal parameter of foo. We do not want a DIE for > > + unusedbar. */ > > +/* { dg-final { scan-assembler-times "DW_TAG_subprogram" 4 } } */ > > +/* { dg-final { scan-assembler-times "DW_TAG_formal_parameter" 2 } } */ > > +/* { dg-final { scan-assembler-not "unusedbar" } } */ > > The test doesn't reference unusedbar at all, is that intended?
Whoops, fixed. Richard.