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:
parent
d482c07b34
commit
6b6c89b37b
1 changed files with 20 additions and 0 deletions
20
gcc/testsuite/g++.dg/template/local-var1.C
Normal file
20
gcc/testsuite/g++.dg/template/local-var1.C
Normal 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]> ();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue