summaryrefslogtreecommitdiff
path: root/test/test16.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-21 02:13:25 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-21 02:13:25 +0300
commit97f87df9fe13dcbbf89cd426c30a9aa1661f2e50 (patch)
tree179371f0160c396369eba2523d6083e75b16e829 /test/test16.c
parentefb250b8f28843e1caeefb5780274da57e7aa4d2 (diff)
downloadparanucker-97f87df9fe13dcbbf89cd426c30a9aa1661f2e50.tar.gz
paranucker-97f87df9fe13dcbbf89cd426c30a9aa1661f2e50.tar.bz2
paranucker-97f87df9fe13dcbbf89cd426c30a9aa1661f2e50.tar.xz
paranucker-97f87df9fe13dcbbf89cd426c30a9aa1661f2e50.zip
Add test16.
Diffstat (limited to 'test/test16.c')
-rw-r--r--test/test16.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/test/test16.c b/test/test16.c
new file mode 100644
index 0000000..beb5187
--- /dev/null
+++ b/test/test16.c
@@ -0,0 +1,69 @@
+struct Data1
+{
+ int val;
+};
+
+int k;
+
+void func1(struct Data1 *ptr1, struct Data1 *ptr2)
+{
+ if (!ptr1 || ptr1->val == 100)
+ {
+ return;
+ }
+
+ ptr1->val = 200;
+}
+
+void func2(struct Data1 *ptr1, struct Data1 *ptr2)
+{
+ if (ptr1 && ptr1->val == 100)
+ {
+ ptr1->val = 200;
+ return;
+ }
+
+ ptr1->val = 300;
+}
+
+void func3(struct Data1 *ptr1, struct Data1 *ptr2)
+{
+ if (ptr1 || ptr1->val == 100)
+ {
+ return;
+ }
+
+ ptr1->val = 200;
+}
+
+void func4(struct Data1 *ptr1, struct Data1 *ptr2)
+{
+ if (!ptr1 && ptr1->val == 100)
+ {
+ return;
+ }
+
+ ptr1->val = 200;
+}
+
+void func5(struct Data1 *ptr1, struct Data1 *ptr2)
+{
+ if ((!ptr1 || ptr1->val == 100) || (!ptr2 || ptr2->val == 200))
+ {
+ return;
+ }
+
+ ptr1->val = 300;
+ ptr2->val = 400;
+}
+
+void func6(struct Data1 *ptr1, struct Data1 *ptr2)
+{
+ if ((!ptr1 || ptr1->val == 100) && (!ptr2 || ptr2->val == 200))
+ {
+ return;
+ }
+
+ ptr1->val = 300;
+ ptr2->val = 400;
+}