c++: add fixed test [PR39057]

This was fixed by r16-6725 and we no longer crash.  The error is
expected.

	PR c++/39057

gcc/testsuite/ChangeLog:

	* g++.dg/template/friend89.C: New test.
This commit is contained in:
Marek Polacek
2026-03-07 12:29:48 -05:00
parent 0fdaf0eb61
commit 9f99ee9d10

View File

@@ -0,0 +1,11 @@
// PR c++/39057
struct A
{
template<int> void foo();
};
template<int> struct B
{
friend void A::foo<0>(int = 0); // { dg-error "friend declaration" }
};