diff options
author | Marek Polacek <polacek@redhat.com> | 2021-04-07 16:44:24 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2021-04-08 07:44:44 -0400 |
commit | 2cd5333d16419f596d07a830bb3f1c40fa8a7b5c (patch) | |
tree | 8cb3dd03be101b1c26c6ef8760fd30a6cf0adb18 /libphobos/libdruntime/gcc | |
parent | e34f88c955b417ea0ce0d5892cc4f83720b818d5 (diff) | |
download | gcc-2cd5333d16419f596d07a830bb3f1c40fa8a7b5c.zip gcc-2cd5333d16419f596d07a830bb3f1c40fa8a7b5c.tar.gz gcc-2cd5333d16419f596d07a830bb3f1c40fa8a7b5c.tar.bz2 |
c++: Fix ICE with unexpanded parameter pack [PR99844]
In explicit17.C, we weren't detecting an unexpanded parameter pack in
explicit(bool), so we crashed on a TEMPLATE_PARM_INDEX in constexpr.
I noticed the same is true for noexcept(), but only since my patch to
implement delayed parsing of noexcept. Previously, we would detect the
unexpanded pack in push_template_decl but now the noexcept expression
has not yet been parsed, so we need to do it a bit later.
gcc/cp/ChangeLog:
PR c++/99844
* decl.c (build_explicit_specifier): Call
check_for_bare_parameter_packs.
* except.c (build_noexcept_spec): Likewise.
gcc/testsuite/ChangeLog:
PR c++/99844
* g++.dg/cpp2a/explicit16.C: Use c++20.
* g++.dg/cpp0x/noexcept66.C: New test.
* g++.dg/cpp2a/explicit17.C: New test.
Diffstat (limited to 'libphobos/libdruntime/gcc')
0 files changed, 0 insertions, 0 deletions