llvm-project/clang/test/CodeGen/2009-06-01-addrofknr.c

23 lines
266 B
C
Raw Normal View History

// RUN: %clang_cc1 %s -o %t -emit-llvm -verify
// expected-no-diagnostics
// PR4289
struct funcptr {
2009-07-22 04:52:43 +08:00
int (*func)();
};
static int func(f)
2009-07-22 04:52:43 +08:00
void *f;
{
2009-07-22 04:52:43 +08:00
return 0;
}
int
main(int argc, char *argv[])
{
2009-07-22 04:52:43 +08:00
struct funcptr fp;
2009-07-22 04:52:43 +08:00
fp.func = &func;
fp.func = func;
}