From 6b6c89b37bc26791943ea79191891e77591de2b8 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 24 Sep 2020 12:13:28 -0700 Subject: [PATCH] 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. --- gcc/testsuite/g++.dg/template/local-var1.C | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/local-var1.C 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 (); + } +} -- 2.30.2