[gcc(refs/vendors/ARM/heads/arm-perf-staging)] testsuite: Fix up pr94314*.C tests [PR94314]
Tamar Christina
tnfchris@gcc.gnu.org
Fri Jul 17 14:30:01 GMT 2020
https://gcc.gnu.org/g:6c9a711575d8fdf9e75f01d7a0e84d558600df40
commit 6c9a711575d8fdf9e75f01d7a0e84d558600df40
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Apr 8 20:04:01 2020 +0200
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 <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.
Diff:
---
gcc/testsuite/ChangeLog | 5 +++++
gcc/testsuite/g++.dg/pr94314-3.C | 4 ++--
gcc/testsuite/g++.dg/pr94314.C | 6 +++---
3 files changed, 10 insertions(+), 5 deletions(-)
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 <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 ...
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);
More information about the Gcc-cvs
mailing list