diff options
author | David Malcolm <dmalcolm@redhat.com> | 2019-01-17 17:07:20 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2019-01-17 17:07:20 +0000 |
commit | b9e03679808ef26ba9614d352f69a347df120265 (patch) | |
tree | 78b273b9ec572ff1333ec21a19a2cd105bc0f1cb /gcc/testsuite/gcc.dg/utf-array-short-wchar.c | |
parent | 213694e56e6265044bc85dbf43bda9028f05dba7 (diff) | |
download | gcc-b9e03679808ef26ba9614d352f69a347df120265.zip gcc-b9e03679808ef26ba9614d352f69a347df120265.tar.gz gcc-b9e03679808ef26ba9614d352f69a347df120265.tar.bz2 |
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.
From-SVN: r268041
Diffstat (limited to 'gcc/testsuite/gcc.dg/utf-array-short-wchar.c')
0 files changed, 0 insertions, 0 deletions