Commit 06ff274f by Paolo Carlini Committed by Paolo Carlini

re PR c++/85070 (ICE on C++ code: in lazily_declare_fn, at cp/method.c:2409)

/cp
2018-09-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/85070
	* method.c (lazily_declare_fn): During error-recovery add_method
	may return false.

/testsuite
2018-09-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/85070
	* g++.dg/cpp0x/pr85070.C: New.

From-SVN: r264541
parent 708c728d
2018-09-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85070
* method.c (lazily_declare_fn): During error-recovery add_method
may return false.
2018-09-21 Marek Polacek <polacek@redhat.com> 2018-09-21 Marek Polacek <polacek@redhat.com>
PR c++/87372 - __func__ constexpr evaluation. PR c++/87372 - __func__ constexpr evaluation.
......
...@@ -2421,7 +2421,7 @@ lazily_declare_fn (special_function_kind sfk, tree type) ...@@ -2421,7 +2421,7 @@ lazily_declare_fn (special_function_kind sfk, tree type)
/* Add it to the class */ /* Add it to the class */
bool added = add_method (type, fn, false); bool added = add_method (type, fn, false);
gcc_assert (added); gcc_assert (added || errorcount);
/* Add it to TYPE_FIELDS. */ /* Add it to TYPE_FIELDS. */
if (sfk == sfk_destructor if (sfk == sfk_destructor
......
2018-09-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85070
* g++.dg/cpp0x/pr85070.C: New.
2018-09-24 H.J. Lu <hongjiu.lu@intel.com> 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/82699 PR target/82699
......
// { dg-do compile { target c++11 } }
struct A;
struct B
{
constexpr A & operator= (const A &); // { dg-warning "used" "" { target c++14_only } }
};
struct A : B // { dg-error "cannot be overloaded" "" { target c++14_only } }
{
using B::operator=;
} a { a = a };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment