3 /* { dg-options "-std=gnu99" } */
5 extern void f0 (int *);
6 extern void f0 (int *__restrict);
8 extern void f1 (int *__restrict);
9 extern void f1 (int *);
11 typedef union { int *i; long *l; } U2
12 __attribute__((transparent_union));
14 extern void f2 (int *);
16 typedef union { int *__restrict i; long *__restrict l; } U3
17 __attribute__((transparent_union));
19 extern void f3 (int *__restrict);
22 extern void f4 (int *);
25 extern void f5 (int *__restrict);
27 typedef union { long *l; int *i; } U6
28 __attribute__((transparent_union));
30 extern void f6 (int *);
32 typedef union { long *__restrict l; int *__restrict i; } U7
33 __attribute__((transparent_union));
35 extern void f7 (int *__restrict);
38 extern void f8 (int *);
41 extern void f9 (int *__restrict);
55 f0 (&l); /* { dg-warning "passing argument 1 of 'f0' from incompatible pointer type" } */
57 f1 (&l); /* { dg-warning "passing argument 1 of 'f1' from incompatible pointer type" } */
59 f2 (&l); /* { dg-warning "passing argument 1 of 'f2' from incompatible pointer type" } */
61 f3 (&l); /* { dg-warning "passing argument 1 of 'f3' from incompatible pointer type" } */
63 f4 (&l); /* { dg-warning "passing argument 1 of 'f4' from incompatible pointer type" } */
65 f5 (&l); /* { dg-warning "passing argument 1 of 'f5' from incompatible pointer type" } */
67 f6 (&l); /* { dg-warning "passing argument 1 of 'f6' from incompatible pointer type" } */
69 f7 (&l); /* { dg-warning "passing argument 1 of 'f7' from incompatible pointer type" } */
71 f8 (&l); /* { dg-warning "passing argument 1 of 'f8' from incompatible pointer type" } */
73 f9 (&l); /* { dg-warning "passing argument 1 of 'f9' from incompatible pointer type" } */
85 /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } 0 } */