2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr60647-2.c
blob60655bf54ecce995df3416a8ec60a50b6ba7db9a
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 struct _wincore
6 int width, height;
7 };
9 void fn1 (int);
10 void fn2 (int, int, int *);
12 static void
13 foo (void *dpy, struct _wincore *winInfo, int offset)
15 fn1 (winInfo->height);
18 static void
19 bar (void *dpy, int winInfo, int *visrgn)
21 ((void (*) (void *, int, int)) foo) ((void *) 0, winInfo, 0); /* { dg-warning "function called through a non-compatible type" } */
22 fn2 (0, 0, visrgn);
25 void
26 baz (void *dpy, int win, int prop)
28 bar ((void *) 0, 0, (int *) 0);