Nathan Sidwell 2b0e81d5cc c++: per-scope, per-signature lambda discriminators
This implements ABI-compliant lambda discriminators.  Not only do we
have per-scope counters, but we also distinguish by lambda signature.
Only lambdas with the same signature will need non-zero
discriminators.  As the discriminator is signature-dependent, we have
to process the lambda function's declaration before we can determine
it.  For templated and generic lambdas the signature is that of the
uninstantiated lambda -- not separate for each instantiation.

With this change, gcc and clang now produce the same lambda manglings
for all these testcases.

	gcc/cp/
	* cp-tree.h (LAMBDA_EXPR_SCOPE_SIG_DISCRIMINATOR): New.
	(struct tree_lambda_expr): Add discriminator_sig bitfield.
	(recrd_lambda_scope_sig_discriminator): Declare.
	* lambda.cc (struct lambda_sig_count): New.
	(lambda_discriminator): Add signature vector.
	(start_lambda_scope): Adjust.
	(compare_lambda_template_head, compare_lambda_sig): New.
	(record_lambda_scope_sig_discriminator): New.
	* mangle.cc (write_closure_type): Use the scope-sig discriminator for
	ABI >= 18.  Emit abi mangling warning if needed.
	* module.cc (trees_out::core_vals): Stream the new discriminator.
	(trees_in::core_vals): Likewise.
	* parser.cc (cp_parser_lambda_declarator_opt): Call
	record_lambda_scope_sig_discriminator.
	* pt.cc (tsubst_lambda_expr): Likewise.
	libcc1/
	* libcp1plugin.cc (plugin_start_lambda_closure_class_type):
	Initialize the per-scope, per-signature discriminator.
	gcc/testsuite/
	* g++.dg/abi/lambda-sig1-18.C: New.
	* g++.dg/abi/lambda-sig1-18vs17.C: New.
	* g++.dg/cpp1y/lambda-mangle-1-18.C: New.
2022-11-01 17:44:36 -04:00
2022-10-20 00:17:52 +00:00
2022-10-21 00:17:52 +00:00
2022-10-08 00:17:29 +00:00
2022-09-01 00:17:39 +00:00
2022-08-31 00:16:45 +00:00
2022-11-01 00:19:02 +00:00
2022-08-26 00:16:21 +00:00
2022-10-20 00:17:52 +00:00
2022-10-13 00:17:37 +00:00
2022-10-20 00:17:52 +00:00
2022-10-08 00:17:29 +00:00
2022-10-13 00:17:37 +00:00
2022-10-24 00:16:31 +00:00
2022-10-13 00:17:37 +00:00
2022-10-29 00:17:49 +00:00
2022-10-19 00:19:08 +00:00
2022-11-01 00:19:02 +00:00
2022-10-21 00:17:52 +00:00
2022-10-13 00:17:37 +00:00
2022-10-30 00:16:29 +00:00
2022-10-13 00:17:37 +00:00
2022-10-20 00:17:52 +00:00
2022-10-13 00:17:37 +00:00
2022-11-01 00:19:02 +00:00
2022-10-13 00:17:37 +00:00
2022-07-29 00:16:21 +00:00
2022-10-13 00:17:37 +00:00
2022-11-01 00:19:02 +00:00
2022-10-31 11:15:45 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 2.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%