Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / cwsc0.c
blob3d92222bf9cc7500d8fcba470d316ec62e195fcd
1 /* { dg-do compile } */
3 #include <stddef.h>
5 void foo(void);
6 void test(int (*f)(void), char *p)
8 __builtin_call_with_static_chain(f(), p);
9 __builtin_call_with_static_chain(p, f()); /* { dg-error "must be a call" } */
10 __builtin_call_with_static_chain(f() + 1, p); /* { dg-error "must be a call" } */
11 __builtin_call_with_static_chain(f(), 0); /* { dg-error "must be a pointer" } */
12 __builtin_call_with_static_chain(f(), NULL);
13 __builtin_call_with_static_chain(foo, p); /* { dg-error "must be a call" } */
14 __builtin_call_with_static_chain(foo(), p);
15 __builtin_call_with_static_chain(foo(), foo);