1 // Test that duplicate function parameters are found in declarations.
3 extern void g0 (int a, int b);
4 extern void g1 (int a, float b);
7 int a); // { dg-error "multiple parameters named 'a'" }
9 float a); // { dg-error "multiple parameters named 'a'" }
10 extern void f3 (int a, int b, int c,
11 int a); // { dg-error "multiple parameters named 'a'" }
12 extern void f4 (int a, int b, int c,
14 int a); // { dg-error "multiple parameters named 'a'" }
15 extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h,
17 int i, int j, int k, int l, int m, int n, int o, int p,
18 int q, int r, int s, int t, int u, int v, int w, int x, int y,
19 int z); // { dg-error "multiple parameters named 'a'" }
21 extern void f6 (int a, int, int, int, int, int, int, int, int, int, int,
23 int, int, int, int, int, int, int, int, int, int, int,
24 float, float, float, float, float, float, float, float,
25 int); // { dg-error "multiple parameters named 'a'" }
27 extern void f7 (void (*a)(int),
28 void (*a)(int)); // { dg-error "multiple parameters named 'a'" }
29 extern void f8 (float (*a)(int),
30 int (*a)(float)); // { dg-error "multiple parameters named 'a'" }
32 extern void f9 (int a,
35 // { dg-error "multiple parameters named 'a'" "" { target *-*-* } 34 }
37 extern void f10 (int a,
43 // { dg-error "multiple parameters named 'a'" "" { target *-*-* } 42 }
44 // { dg-error "multiple parameters named 'b'" "" { target *-*-* } 42 }
45 // { dg-error "multiple parameters named 'c'" "" { target *-*-* } 42 }
49 void C1_g0 (int a, int b);
51 int a); // { dg-error "multiple parameters named 'a'" }
57 void C2_g0 (T a, T b);
59 T a); // { dg-error "multiple parameters named 'a'" }