summaryrefslogtreecommitdiff
path: root/test/test43.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test43.cpp')
-rw-r--r--test/test43.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test43.cpp b/test/test43.cpp
index 91152f9..d1df67f 100644
--- a/test/test43.cpp
+++ b/test/test43.cpp
@@ -64,6 +64,7 @@ class Object1
Data1 *tmp3 __attribute__((nonnullpointer));
int x;
int y;
+ static Data1 *garr1[10];
Data1 *getData1()
{
@@ -95,4 +96,12 @@ class Object1
x = tmp3->val;
y = tmp3->arr[0];
}
+
+ void func5()
+ {
+ int idx = 5;
+ Data1 *const ptr1 = garr1[idx];
+ if (ptr1)
+ ptr1->val = 100;
+ }
};