aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c
blob: ddeb117852386b4a9c1b6a731bd347d814ddcc79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile } */
/* { dg-options "-O2" } */

struct _wincore
{
  int width, height;
};

static void
foo (void *dpy, struct _wincore *winInfo, int offset)
{
  fn1 (winInfo->height);
}

static void
bar (void *dpy, int winInfo, int *visrgn)
{
  ((void (*) (void *, int, int)) foo) ((void *) 0, winInfo, 0);  /* { dg-warning "function called through a non-compatible type" } */
  fn2 (0, 0, visrgn);
}

void
baz (void *dpy, int win, int prop)
{
  bar ((void *) 0, 0, (int *) 0);
}