]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR c++/89767 (ICE with tuple and optimization)
authorJakub Jelinek <jakub@redhat.com>
Fri, 30 Aug 2019 12:29:13 +0000 (14:29 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 30 Aug 2019 12:29:13 +0000 (14:29 +0200)
commitffaf40c06df8ab043024fcfd3de7f45985b2aed1
treec85d546707eeb66ab1b55bfafded12777ee8978c
parenta3b2e69ae42c70e0c7f634406369095804e96016
backport: re PR c++/89767 (ICE with tuple and optimization)

Backported from mainline
2019-03-21  Jakub Jelinek  <jakub@redhat.com>

PR c++/89767
* parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
variables, check for duplicates in this function.
* lambda.c (add_capture): Don't check for duplicates nor use
IDENTIFIER_MARKED.
(register_capture_members): Don't clear IDENTIFIER_MARKED here.

* g++.dg/cpp1y/lambda-init18.C: New test.
* g++.dg/cpp1y/lambda-init19.C: New test.
* g++.dg/cpp1y/pr89767.C: New test.

From-SVN: r275139
gcc/cp/ChangeLog
gcc/cp/lambda.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/lambda-init18.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/lambda-init19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/pr89767.C [new file with mode: 0644]