diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b00b8917df9..fd14eab5918 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-09-21 Jonathan Wakely + Jack Howarth + + PR c++/45645 + * g++.dg/torture/pr44972.C: Use portable assert(). + 2010-09-21 Richard Guenther PR tree-optimization/45580 diff --git a/gcc/testsuite/g++.dg/torture/pr44972.C b/gcc/testsuite/g++.dg/torture/pr44972.C index 81806076c58..e409148da1c 100644 --- a/gcc/testsuite/g++.dg/torture/pr44972.C +++ b/gcc/testsuite/g++.dg/torture/pr44972.C @@ -74,7 +74,7 @@ class optional : public optional_base T const& get() const ; - T const* operator->() const { ((this->is_initialized()) ? static_cast (0) : __assert_fail ("this->is_initialized()", "pr44972.C", 78, __PRETTY_FUNCTION__)) ; return this->get_ptr_impl() ; } + T const* operator->() const { assert(this->is_initialized()) ; return this->get_ptr_impl() ; } } ;