aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/misc-ps.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m
index 5cfcd714cd..ce166880f8 100644
--- a/test/Analysis/misc-ps.m
+++ b/test/Analysis/misc-ps.m
@@ -508,3 +508,17 @@ FARPROC test_load_func(FARPROC origfun) {
return origfun;
return 0;
}
+
+// Test passing-by-value an initialized struct variable.
+struct test_pass_val {
+ int x;
+ int y;
+};
+void test_pass_val_aux(struct test_pass_val s);
+void test_pass_val() {
+ struct test_pass_val s;
+ s.x = 1;
+// s.y = 2;
+ test_pass_val_aux(s);
+}
+