2009-06-02 17:58:47 +00:00
|
|
|
// RUN: clang-cc %s -o %t -emit-llvm -verify
|
|
|
|
// PR4289
|
|
|
|
|
|
|
|
struct funcptr {
|
2009-10-14 18:03:49 +00:00
|
|
|
int (*func)();
|
2009-06-02 17:58:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static int func(f)
|
2009-10-14 18:03:49 +00:00
|
|
|
void *f;
|
2009-06-02 17:58:47 +00:00
|
|
|
{
|
2009-10-14 18:03:49 +00:00
|
|
|
return 0;
|
2009-06-02 17:58:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2009-10-14 18:03:49 +00:00
|
|
|
struct funcptr fp;
|
2009-06-02 17:58:47 +00:00
|
|
|
|
2009-10-14 18:03:49 +00:00
|
|
|
fp.func = &func;
|
|
|
|
fp.func = func;
|
2009-06-02 17:58:47 +00:00
|
|
|
}
|