diff options
Diffstat (limited to 'util/romcc/tests/linux_test3.c')
-rw-r--r-- | util/romcc/tests/linux_test3.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/util/romcc/tests/linux_test3.c b/util/romcc/tests/linux_test3.c new file mode 100644 index 0000000000..97187ae5e6 --- /dev/null +++ b/util/romcc/tests/linux_test3.c @@ -0,0 +1,28 @@ +#include "linux_syscall.h" +#include "linux_console.h" +static void goto_test(void) +{ + int i; + print_debug("goto_test\n"); + + i = 0; + goto bottom; + { + top: + print_debug("i = "); + print_debug_hex8(i); + print_debug("\n"); + + i = i + 1; + } + bottom: + if (i < 10) { + goto top; + } +} + +static void main(void) +{ + goto_test(); + _exit(0); +} |