From: Nathan Sidwell Date: Thu, 24 Sep 2020 19:13:28 +0000 (-0700) Subject: c++: add testcase [PR97177] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b6c89b37bc26791943ea79191891e77591de2b8;p=gcc.git 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. --- diff --git a/gcc/testsuite/g++.dg/template/local-var1.C b/gcc/testsuite/g++.dg/template/local-var1.C new file mode 100644 index 00000000000..4b3854b3e53 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/local-var1.C @@ -0,0 +1,20 @@ +// PR c++/97186, related to c++/97171 but with a variable +// { dg-do compile { target c++11 } } + +namespace +{ + template + void + ml () + { + extern WF cr; + + static_assert (sizeof (cr) == 12, ""); + } + + void + qc () + { + ml (); + } +}