]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix up pr94314*.C tests [PR94314]
authorJakub Jelinek <jakub@redhat.com>
Wed, 8 Apr 2020 18:04:01 +0000 (20:04 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 8 Apr 2020 18:04:01 +0000 (20:04 +0200)
The test FAIL everywhere where size_t is not unsigned long.  Fixed by
using __SIZE_TYPE__ instead.

2020-04-08  Jakub Jelinek  <jakub@redhat.com>

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.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr94314-3.C
gcc/testsuite/g++.dg/pr94314.C

index dcf552f2a0316d750edbdb747ca3de01196b514f..8916b897cc41c2d832af8d657952e27884dc6a6b 100644 (file)
@@ -1,5 +1,10 @@
 2020-04-08  Jakub Jelinek  <jakub@redhat.com>
 
+       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 ...
index a5b1013929040bdf4154eb84732f51443bab051d..575ba9d8ad86f4a2141faaeb07299fbdb3f08c8f 100644 (file)
@@ -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;
index a06800d2219b98d5f650e4567dfd307ae4db36ce..86e651d10ba6cb34389655fd0358141c188638e8 100644 (file)
@@ -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);