aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000706-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000706-4.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000706-4.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000706-4.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000706-4.c
new file mode 100644
index 000000000..01cc879c3
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000706-4.c
@@ -0,0 +1,22 @@
+extern void abort(void);
+extern void exit(int);
+
+int *c;
+
+void bar(int b)
+{
+ if (*c != 1 || b != 2)
+ abort();
+}
+
+void foo(int a, int b)
+{
+ c = &a;
+ bar(b);
+}
+
+int main()
+{
+ foo(1, 2);
+ exit(0);
+}