r268041 - in /trunk/gcc: cp/ChangeLog cp/class....
dmalcolm@gcc.gnu.org
dmalcolm@gcc.gnu.org
Thu Jan 17 17:07:00 GMT 2019
Author: dmalcolm
Date: Thu Jan 17 17:07:20 2019
New Revision: 268041
URL: https://gcc.gnu.org/viewcvs?rev=268041&root=gcc&view=rev
Log:
C++: Fix ICE when adding overloaded operator via using_decl (PR c++/88699)
PR c++/88699 reports an ICE within this assertion in add_method:
gcc_assert (!current_fns || !DECL_DESTRUCTOR_P (method));
when adding an overloaded operator to a class via a using_decl, due to
DECL_DESTRUCTOR_P requiring a FUNCTION_DECL, but "method" being a
USING_DECL.
This patch weakens the assertion to avoid testing DECL_DESTRUCTOR_P
for the case where "via_using" is true, fixing the ICE.
gcc/cp/ChangeLog:
PR c++/88699
* class.c (add_method): Don't use DECL_DESTRUCTOR_P on
USING_DECLs.
gcc/testsuite/ChangeLog:
PR c++/88699
* g++.dg/template/pr88699.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/pr88699.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list