gcc/testsuite/gcc.target/bpf/constant-calls-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-std=c89 -O2" } */ |
| 3 | |
| 4 | static void * (*bpf_map_lookup_elem)(void *map, const void *key) = (void *) 666; |
| 5 | |
| 6 | int foo () |
| 7 | { |
| 8 | char *ret; |
| 9 | |
| 10 | ret = bpf_map_lookup_elem (ret, ret); |
| 11 | if (ret) |
| 12 | return 0; |
| 13 | return 1; |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-assembler "call\t666" } } */ |