[Bug c++/99063] [9/10/11 Regression] ICE in prep_operand, at cp/call.c:5842
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 11 16:14:22 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99063
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:f0da1c0cb7661ee9111bc475efddae80a026de34
commit r11-7192-gf0da1c0cb7661ee9111bc475efddae80a026de34
Author: Marek Polacek <polacek@redhat.com>
Date: Wed Feb 10 22:51:30 2021 -0500
c++: ICE with unexpanded pack in do-while [PR99063]
Here an unexpanded parameter pack snuck into prep_operand which doesn't
expect to see an operand without a type, and since r247842
NONTYPE_ARGUMENT_PACK doesn't have a type anymore.
This only happens with the do-while loop whose condition may not
contain a declaration so we never called finish_cond which checks
for unexpanded parameter packs. So use check_for_bare_parameter_packs
to remedy that.
gcc/cp/ChangeLog:
PR c++/99063
* semantics.c (finish_do_stmt): Check for unexpanded parameter
packs.
gcc/testsuite/ChangeLog:
PR c++/99063
* g++.dg/cpp0x/variadic-crash6.C: New test.
More information about the Gcc-bugs
mailing list