1typedef int (*fun_t)(void*); 2 3int foo(void *a, void *fun) 4{ 5 return ((fun_t)fun)(a); 6} 7 8int bar(void *a, void *fun) 9{ 10 return ((int (*)(void *))fun)(a); 11} 12 13int qux(void *a, void *fun) 14{ 15 return (*(fun_t)fun)(a); 16} 17 18int quz(void *a, void *fun) 19{ 20 return (*(int (*)(void *))fun)(a); 21} 22 23/* 24 * check-name: call via casted function pointer 25 * check-command: test-linearize -Wno-decl $file 26 * 27 * check-output-ignore 28 * check-output-excludes: load 29 * check-output-pattern(4): ptrcast\\..* %arg2 30 * check-output-pattern(4): call\\..* %arg1 31 */ 32