aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/bpf/diag-funargs.c
blob: 42b5f05b67c3d8d0956036cae02f627817c56070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Verify proper errors are generated for functions taking too many
   arguments.  */
/* { dg-do compile } */
/* { dg-options "-O0" } */

int
foo (int a1,  /* { dg-error "too many function arguments" } */
     int a2,
     int a3,
     int a4,
     int a5,
     int a6)
{
  return a1 + a2 + a3 + a4 + a5 + a6;
}

int
bar (int i1, int i2, int i3, int i4, int i5)
{
  return foo (i1, i2, i3, i4, i5, 10);
}