c++: add testcase [PR97177]

Pr97177 is the local-var duplicate of pr97171.  So just adding the testcase.

	gcc/testsuite/
	* g++.dg/template/local-var1.C: New.
This commit is contained in:
Nathan Sidwell 2020-09-24 12:13:28 -07:00
parent d482c07b34
commit 6b6c89b37b

View file

@ -0,0 +1,20 @@
// PR c++/97186, related to c++/97171 but with a variable
// { dg-do compile { target c++11 } }
namespace
{
template <typename WF>
void
ml ()
{
extern WF cr;
static_assert (sizeof (cr) == 12, "");
}
void
qc ()
{
ml<int[3]> ();
}
}