1 /* Test BTF generation for a function with an unrepresentable parameter.
2
3 BTF has no encoding for floating point types, among others. Function
4 parameters of unrepresentable types are emitted as 'void' types.
5
6 We expect one BTF_KIND_FUNC_PROTO with 3 parameters, one of which
7 has type_id=0. */
8
9 /* { dg-do compile } */
10 /* { dg-options "-O0 -gbtf -dA" } */
11
12 /* { dg-final { scan-assembler-times "\[\t \]0xd000003\[\t \]+\[^\n\]*btt_info" 1 } } */
13 /* { dg-final { scan-assembler-times "farg_name" 3 } } */
14 /* { dg-final { scan-assembler-times "farg_type" 3 } } */
15
16 /* Exactly one function parameter should have type_id=0. */
17 /* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*farg_type" 1 } } */
18
foo(int a,float f,long b)19 int foo (int a, float __attribute__((__vector_size__(16))) f, long b)
20 {
21 return 0;
22 }
23