summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/asan/pr81340.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/asan/pr81340.C')
-rw-r--r--gcc/testsuite/g++.dg/asan/pr81340.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/asan/pr81340.C b/gcc/testsuite/g++.dg/asan/pr81340.C
new file mode 100644
index 00000000000..76ac08a9a56
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr81340.C
@@ -0,0 +1,22 @@
+// { dg-options "-fsanitize=address -O2 -g -Wno-write-strings" }
+
+class a {
+ struct b {
+ b(int, int);
+ } c;
+
+public:
+ int d;
+ a(char *) : c(0, d) {}
+};
+class e {
+ int f(const int &, const int &, const int &, bool, bool, bool, int, bool);
+};
+class g {
+public:
+ static g *h();
+ void i(a, void *);
+};
+int e::f(const int &, const int &, const int &, bool j, bool, bool, int, bool) {
+ g::h()->i("", &j);
+}