aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20000420-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20000420-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20000420-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20000420-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20000420-1.c
new file mode 100644
index 000000000..552f02e42
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20000420-1.c
@@ -0,0 +1,19 @@
+struct z_candidate { struct z_candidate *next;int viable;};
+int pedantic;
+
+static struct z_candidate *
+splice_viable (cands)
+ struct z_candidate *cands;
+{
+ struct z_candidate **p = &cands;
+
+ for (; *p; )
+ {
+ if (pedantic ? (*p)->viable == 1 : (*p)->viable)
+ p = &((*p)->next);
+ else
+ *p = (*p)->next;
+ }
+
+ return cands;
+}