r274316 - in /branches/gcc-9-branch/gcc: cp/Cha...
jason@gcc.gnu.org
jason@gcc.gnu.org
Mon Aug 12 17:46:00 GMT 2019
Author: jason
Date: Mon Aug 12 17:46:32 2019
New Revision: 274316
URL: https://gcc.gnu.org/viewcvs?rev=274316&root=gcc&view=rev
Log:
PR c++/91378 - ICE with noexcept and auto return type.
Here, since the call to g is not type-dependent, we call mark_used on it to
determine its return type. This also wants to instantiate the
noexcept-expression. But since nothing in maybe_instantiate_noexcept was
calling push_to_top_level, we substituted b.i with processing_template_decl
set, so we left it unresolved for later access checking. As a result, the
type of C::g<int> remained instantiation-dependent, leading to an ICE in
type_dependent_expression_p on the assert that the type of a function
template with no dependent template arguments must be non-dependent.
* pt.c (maybe_instantiate_noexcept): push_to_top_level.
Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp1y/auto-fn56.C
Modified:
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/pt.c
More information about the Gcc-cvs
mailing list