diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-09-24 12:13:28 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-09-24 12:13:28 -0700 |
commit | 6b6c89b37bc26791943ea79191891e77591de2b8 (patch) | |
tree | 77b5e05a02642cbe275ef9c6a7bc5d5da4e78dfa /gcc | |
parent | d482c07b34558998658eac7fede023a853561314 (diff) | |
download | gcc-6b6c89b37bc26791943ea79191891e77591de2b8.zip gcc-6b6c89b37bc26791943ea79191891e77591de2b8.tar.gz gcc-6b6c89b37bc26791943ea79191891e77591de2b8.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/template/local-var1.C | 20 |
1 files changed, 20 insertions, 0 deletions
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 0000000..4b3854b --- /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 <typename WF> + void + ml () + { + extern WF cr; + + static_assert (sizeof (cr) == 12, ""); + } + + void + qc () + { + ml<int[3]> (); + } +} |