From: Jakub Jelinek Date: Wed, 8 Apr 2020 18:04:01 +0000 (+0200) Subject: testsuite: Fix up pr94314*.C tests [PR94314] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c9a711575d8fdf9e75f01d7a0e84d558600df40;p=gcc.git testsuite: Fix up pr94314*.C tests [PR94314] The test FAIL everywhere where size_t is not unsigned long. Fixed by using __SIZE_TYPE__ instead. 2020-04-08 Jakub Jelinek PR c++/94314 * g++.dg/pr94314.C (A::operator new, B::operator new, C::operator new): Use __SIZE_TYPE__ instead of unsigned long. * g++.dg/pr94314-3.C (base::operator new, B::operator new): Likewise. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcf552f2a03..8916b897cc4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-04-08 Jakub Jelinek + PR c++/94314 + * g++.dg/pr94314.C (A::operator new, B::operator new, C::operator new): + Use __SIZE_TYPE__ instead of unsigned long. + * g++.dg/pr94314-3.C (base::operator new, B::operator new): Likewise. + PR middle-end/94120 PR testsuite/94533 * g++.dg/declare-pr94120.C: Move test to ... diff --git a/gcc/testsuite/g++.dg/pr94314-3.C b/gcc/testsuite/g++.dg/pr94314-3.C index a5b10139290..575ba9d8ad8 100644 --- a/gcc/testsuite/g++.dg/pr94314-3.C +++ b/gcc/testsuite/g++.dg/pr94314-3.C @@ -10,7 +10,7 @@ volatile int idx; struct base { __attribute__ ((malloc, noinline)) static void * - operator new (unsigned long sz) + operator new (__SIZE_TYPE__ sz) { return ::operator new (sz); } @@ -28,7 +28,7 @@ volatile int base::count[2] = {0, 0}; struct B : base { - static void *operator new (unsigned long sz) + static void *operator new (__SIZE_TYPE__ sz) { int c = count[idx]; count[idx] = c + 1; diff --git a/gcc/testsuite/g++.dg/pr94314.C b/gcc/testsuite/g++.dg/pr94314.C index a06800d2219..86e651d10ba 100644 --- a/gcc/testsuite/g++.dg/pr94314.C +++ b/gcc/testsuite/g++.dg/pr94314.C @@ -8,7 +8,7 @@ struct A { __attribute__((malloc,noinline)) - static void* operator new(unsigned long sz) + static void* operator new(__SIZE_TYPE__ sz) { ++count; return ::operator new(sz); @@ -28,7 +28,7 @@ int A::count = 0; struct B { __attribute__((malloc,noinline)) - static void* operator new(unsigned long sz) + static void* operator new(__SIZE_TYPE__ sz) { ++count; return ::operator new(sz); @@ -48,7 +48,7 @@ int B::count = 0; struct C { - static void* operator new(unsigned long sz) + static void* operator new(__SIZE_TYPE__ sz) { ++count; return ::operator new(sz);