gcc/testsuite/gcc.c-torture/compile/calls-void.c
raw| 1 | /* { dg-require-effective-target ptr32plus } */ |
| 2 | /* { dg-require-effective-target untyped_assembly } */ |
| 3 | /* { dg-require-effective-target indirect_calls } */ |
| 4 | /* { dg-additional-options "-std=gnu89" } */ |
| 5 | |
| 6 | typedef void (*T)(void); |
| 7 | f1 () |
| 8 | { |
| 9 | ((T) 0)(); |
| 10 | } |
| 11 | f2 () |
| 12 | { |
| 13 | ((T) 1000)(); |
| 14 | } |
| 15 | f3 () |
| 16 | { |
| 17 | ((T) 10000000)(); |
| 18 | } |
| 19 | f4 (r) |
| 20 | { |
| 21 | ((T) r)(); |
| 22 | } |
| 23 | f5 () |
| 24 | { |
| 25 | int (*r)() = f3; |
| 26 | ((T) r)(); |
| 27 | } |