Patrick Palka eef4fa6968 c++: mark_used and ADL with template-id [PR100344]
My r11-295 patch for PR68942 didn't consider that the callee of an
ADL-eligible function call can be a TEMPLATE_ID_EXPR, and we don't want
to disable mark_used when substituting into the template arguments of
this TEMPLATE_ID_EXPR because the arguments are clearly used regardless
of the outcome of ADL.  In the first testcase below, this oversight
causes us to trip over the assert in build_call_a for the call to
find_index<int> because the function no longer had its TREE_USED bit set
from mark_used.

So this patch restricts the original fix to disable mark_used only when
the callee is a FUNCTION_DECL, which seems to be the only case that
matters for PR68942.  For instance, in the second testcase below we
already don't mark_used the deleted function specialization even before
r11-295.

gcc/cp/ChangeLog:

	PR c++/68942
	PR c++/100344
	* pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
	only when the callee is a FUNCTION_DECL.

gcc/testsuite/ChangeLog:

	PR c++/68942
	PR c++/100344
	* g++.dg/template/call8.C: New test.
	* g++.dg/template/koenig12a.C: New test.
2021-05-03 13:35:26 -04:00
2021-04-02 00:16:26 +00:00
2021-04-28 00:16:36 +00:00
2020-12-15 00:16:35 +00:00
2021-02-03 00:16:23 +00:00
2021-04-01 00:16:39 +00:00
2021-04-17 00:16:25 +00:00
2021-01-04 10:26:59 +01:00
2021-01-16 00:16:29 +00:00
2021-04-07 00:16:39 +00:00
2021-01-06 00:16:55 +00:00
2021-04-30 00:16:37 +00:00
2021-05-03 00:16:25 +00:00
2021-04-12 15:23:16 -07:00
2021-05-01 00:16:28 +00:00
2021-01-06 00:16:55 +00:00
2021-01-16 00:16:29 +00:00
2021-01-06 00:16:55 +00:00
2021-01-06 00:16:55 +00:00
2021-04-22 00:16:32 +00:00
2021-01-06 00:16:55 +00:00
2021-04-18 00:16:21 +00:00
2021-01-06 00:16:55 +00:00
2021-05-03 00:16:25 +00:00
2021-01-06 00:16:55 +00:00
2021-04-21 00:16:23 +00:00
2021-01-06 00:16:55 +00:00
2020-12-02 11:04:01 -07:00
2021-04-29 00:17:01 +00:00
2021-01-05 16:04:14 -07:00
2021-03-12 19:48:13 -05:00
2021-03-12 19:48:13 -05: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.
S
Description
Yggdrasil port of the GNU Compiler Collection
Readme 978 MiB
Languages
C++ 33%
C 27.4%
Ada 13%
Go 7.1%
D 7%
Other 12.1%