2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -o %t -emit-llvm -verify
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-06-01 18:04:20 +08:00
|
|
|
// PR4289
|
|
|
|
|
|
|
|
struct funcptr {
|
2009-07-22 04:52:43 +08:00
|
|
|
int (*func)();
|
2009-06-01 18:04:20 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static int func(f)
|
2009-07-22 04:52:43 +08:00
|
|
|
void *f;
|
2009-06-01 18:04:20 +08:00
|
|
|
{
|
2009-07-22 04:52:43 +08:00
|
|
|
return 0;
|
2009-06-01 18:04:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2009-07-22 04:52:43 +08:00
|
|
|
struct funcptr fp;
|
2009-06-01 18:04:20 +08:00
|
|
|
|
2009-07-22 04:52:43 +08:00
|
|
|
fp.func = &func;
|
|
|
|
fp.func = func;
|
2009-06-01 18:04:20 +08:00
|
|
|
}
|