===================================================================
@@ -26,6 +26,8 @@
void test01()
{
+ bool test __attribute__((unused)) = true;
+
using __gnu_test::counter_type;
const std::size_t nb_values = 1000;
===================================================================
@@ -15,6 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+// { dg-require-normal-mode "" }
// { dg-options "-std=gnu++11" }
#include <cmath>
@@ -27,6 +28,8 @@
void test01()
{
+ bool test __attribute__((unused)) = true;
+
using __gnu_test::counter_type;
const std::size_t nb_values = 1000;
@@ -43,7 +46,7 @@
std::pop_heap(values.begin(), values.end());
- VERIFY( counter_type::less_compare_count <= 2.0 * std::log(nb_values) );
+ VERIFY( counter_type::less_compare_count <= 2.0 * std::log2(nb_values) );
}
int main()
===================================================================
@@ -15,6 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+// { dg-require-normal-mode "" }
// { dg-options "-std=gnu++11" }
#include <cmath>
@@ -27,6 +28,8 @@
void test01()
{
+ bool test __attribute__((unused)) = true;
+
using __gnu_test::counter_type;
const std::size_t nb_values = 1000;
@@ -44,7 +47,7 @@
std::push_heap(values.begin(), values.end());
- VERIFY( counter_type::less_compare_count <= std::log(values.size()) );
+ VERIFY( counter_type::less_compare_count <= std::log2(values.size()) );
}
int main()
===================================================================
@@ -27,6 +27,8 @@
void test01()
{
+ bool test __attribute__((unused)) = true;
+
using __gnu_test::counter_type;
const std::size_t nb_values = 1000;
@@ -43,7 +45,7 @@
std::sort_heap(values.begin(), values.end());
- VERIFY( counter_type::less_compare_count <= 2.0 * nb_values * std::log(nb_values) );
+ VERIFY( counter_type::less_compare_count <= 2.0 * nb_values * std::log2(nb_values) );
}
int main()