diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-09-13 11:57:56 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-09-13 11:57:56 +0000 |
commit | e5b87132fe80abec4bb94179b26c6655b1ad7023 (patch) | |
tree | 2e8172358a4517aba86bfe08a446f9e3dab1a584 /gcc | |
parent | 783dc7392a04bde7bbf6806d55484f3ab37b62db (diff) | |
download | gcc-e5b87132fe80abec4bb94179b26c6655b1ad7023.zip gcc-e5b87132fe80abec4bb94179b26c6655b1ad7023.tar.gz gcc-e5b87132fe80abec4bb94179b26c6655b1ad7023.tar.bz2 |
re PR c++/59949 (lambda expression as default argument of function template causes "already defined" messages in assembler)
2017-09-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59949
* g++.dg/cpp0x/lambda/lambda-defarg7.C: New.
From-SVN: r252079
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg7.C | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6c1fc2d..55a9720 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-13 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/59949 + * g++.dg/cpp0x/lambda/lambda-defarg7.C: New. + 2017-09-13 Wilco Dijkstra <wdijkstr@arm.com> * gcc.target/aarch64/vmov_n_1.c: Update dup scan-assembler. diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg7.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg7.C new file mode 100644 index 0000000..c76b7fd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg7.C @@ -0,0 +1,16 @@ +// PR c++/59949 +// { dg-do assemble { target c++11 } } + +struct A +{ + template<typename T> A(T) { } +}; + +template<typename T> +void +stuff(A = []{ }) { } + +int main() { + stuff<int>(); + stuff<unsigned int>(); +} |