This was fixed by r11-86. Tested x86_64-pc-linux-gnu, applying to trunk.
PR c++/93614 gcc/testsuite/ChangeLog: * g++.dg/template/lookup18.C: New test. --- gcc/testsuite/g++.dg/template/lookup18.C | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/lookup18.C diff --git a/gcc/testsuite/g++.dg/template/lookup18.C b/gcc/testsuite/g++.dg/template/lookup18.C new file mode 100644 index 00000000000..38f7347ef51 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/lookup18.C @@ -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; +}; base-commit: 689407ef916503b2f5a3c8c07fe7d5ab1913f956 -- 2.33.1