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?
Andreas.
--
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."