c++: Add fixed test [PR93614]
authorMarek Polacek <polacek@redhat.com>
Sat, 4 Dec 2021 20:29:18 +0000 (15:29 -0500)
committerMarek Polacek <polacek@redhat.com>
Sat, 4 Dec 2021 20:29:46 +0000 (15:29 -0500)
This was fixed by r11-86.

PR c++/93614

gcc/testsuite/ChangeLog:

* g++.dg/template/lookup18.C: New test.

gcc/testsuite/g++.dg/template/lookup18.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/template/lookup18.C b/gcc/testsuite/g++.dg/template/lookup18.C
new file mode 100644 (file)
index 0000000..38f7347
--- /dev/null
@@ -0,0 +1,17 @@
+// PR c++/93614
+
+template<class T>
+class foo{};
+
+template<class T>
+class template_class_with_struct
+{
+    void my_method() {
+        if(this->b.foo < 1);
+    };
+
+    struct bar
+    {
+        long foo;
+    } b;
+};