annotate gcc/testsuite/gcc.dg/cwsc0.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 #include <stddef.h>
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 void foo(void);
kono
parents:
diff changeset
6 void test(int (*f)(void), char *p)
kono
parents:
diff changeset
7 {
kono
parents:
diff changeset
8 __builtin_call_with_static_chain(f(), p);
kono
parents:
diff changeset
9 __builtin_call_with_static_chain(p, f()); /* { dg-error "must be a call" } */
kono
parents:
diff changeset
10 __builtin_call_with_static_chain(f() + 1, p); /* { dg-error "must be a call" } */
kono
parents:
diff changeset
11 __builtin_call_with_static_chain(f(), 0); /* { dg-error "must be a pointer" } */
kono
parents:
diff changeset
12 __builtin_call_with_static_chain(f(), NULL);
kono
parents:
diff changeset
13 __builtin_call_with_static_chain(foo, p); /* { dg-error "must be a call" } */
kono
parents:
diff changeset
14 __builtin_call_with_static_chain(foo(), p);
kono
parents:
diff changeset
15 __builtin_call_with_static_chain(foo(), foo);
kono
parents:
diff changeset
16 }