From 44041e201dc1fffa099448d5460855f44e834900 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 1 Sep 2008 00:01:55 +0000 Subject: [PATCH 1/1] test for computed goto [r21608] --- parsetest/gnu99/computed_goto.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 parsetest/gnu99/computed_goto.c diff --git a/parsetest/gnu99/computed_goto.c b/parsetest/gnu99/computed_goto.c new file mode 100644 index 0000000..f266b93 --- /dev/null +++ b/parsetest/gnu99/computed_goto.c @@ -0,0 +1,12 @@ +int test(int x) { + static void *array[] = { &&foo, &&bar, &&hack }; + + goto *array[x]; +foo: return 1; +bar: return 2; +hack: return 3; +} + +int main(int argc, char *argv[]) { + return test(1) == 2 ? 0 : 1; +} -- 2.20.1