aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr18291.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr18291.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr18291.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr18291.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr18291.c
new file mode 100644
index 000000000..7d983696f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr18291.c
@@ -0,0 +1,12 @@
+int baz(int k2)
+{
+ int i, j, *p, k = 1, k1 = 0;
+ if (k2)
+ p = &j;
+ else
+ p = &i;
+ if (k1)
+ *p = 0 , p = &k;
+ *p = 1;
+ return k;
+}