aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c
new file mode 100644
index 000000000..ddeb11785
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr60647-2.c
@@ -0,0 +1,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);
+}