]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/91378 - ICE with noexcept and auto return type.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Aug 2019 14:07:59 +0000 (14:07 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Aug 2019 14:07:59 +0000 (14:07 +0000)
commit52b2cdc999b3bd4f9d9c382b1bfd64996d11cccb
tree5780be4efd59ee7d28deecce3135aeecd8b8102d
parentadd510c752d53de29fa01c43034848acfa0775f2
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274143 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1y/auto-fn56.C [new file with mode: 0644]