aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/btf/btf-function-3.c
blob: 7ca0890884edefb3cf6e3144d747b77403448263 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Test BTF generation for a function with an unrepresentable parameter.

   BTF has no encoding for vector types, among others. Function
   parameters of unrepresentable types are emitted as 'void' types.

   We expect one BTF_KIND_FUNC_PROTO with 3 parameters, one of which
   has type_id=0.  */

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

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

/* Exactly one function parameter should have type_id=0.  */
/* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*farg_type" 1 } } */

int foo (int a, float __attribute__((__vector_size__(16))) f, long b)
{
  return 0;
}