aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/btf/btf-function-2.c
blob: 3c7fda9ee355a1f0b41c07627150125ac1f70770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Test BTF generation for functions with varargs.

   We expect one BTF_KIND_FUNC_PROTO with two arguments. The second argument
   should have "farg_name" and "farg_type" both of 0, representing varargs.  */

/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */

/* { dg-final { scan-assembler-times "\[\t \]0xd000002\[\t \]+\[^\n\]*btt_info" 1 } } */
/* { dg-final { scan-assembler-times "farg_name" 2 } } */
/* { dg-final { scan-assembler-times "farg_type" 2 } } */
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*farg_name" 1 } } */
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*farg_type" 1 } } */

int fmt (const char * format, ...)
{
  return 0;
}