aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010118-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010118-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010118-1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010118-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010118-1.c
new file mode 100644
index 000000000..6d1fc6431
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010118-1.c
@@ -0,0 +1,21 @@
+static unsigned int bar(void *h, unsigned int n)
+{
+ static int i;
+ return i++;
+}
+
+static void baz(unsigned int *x)
+{
+ (*x)++;
+}
+
+long
+foo(void *h, unsigned int l)
+{
+ unsigned int n;
+ long m;
+ n = bar(h, 0);
+ n = bar(h, n);
+ m = ({ baz(&n); 21; });
+ return m;
+}