aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000717-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000717-3.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000717-3.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000717-3.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000717-3.c
new file mode 100644
index 000000000..e87d00b00
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000717-3.c
@@ -0,0 +1,26 @@
+int c = -1;
+
+foo (p)
+ int *p;
+{
+ int x;
+ int a;
+
+ a = p[0];
+ x = a + 5;
+ a = c;
+ p[0] = x - 15;
+ return a;
+}
+
+int main()
+{
+ int b = 1;
+ int a = foo(&b);
+
+ if (a != -1 || b != (1 + 5 - 15))
+ abort ();
+
+ exit (0);
+}
+