This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix type of "num" argument to memcpy in gcc.c-torture/compile/pr65595.c


The test uses "unsigned long" as the "num" argument to memcpy, but it should be
size_t, and these types are not equivalent on all targets.

Committed to trunk.


>From 3ebbb8102bd9b984c6f1a1eaf0bca45fe4fd23e1 Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Tue, 6 Nov 2018 12:49:00 +0000
Subject: [PATCH 04/12] [TESTSUITE] size_type memcpy

2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	gcc/testsuite/ChangeLog:
  
	* gcc.c-torture/compile/pr65595.c: Change type of "num" argument to
	memcpy from "unsigned long" to __SIZE_TYPE__.
---
 gcc/testsuite/gcc.c-torture/compile/pr65595.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr65595.c b/gcc/testsuite/gcc.c-torture/compile/pr65595.c
index 0ab7161..b6a0aa4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr65595.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr65595.c
@@ -1,4 +1,4 @@
-extern void *memcpy(void *, const void *, unsigned long);
+extern void *memcpy(void *, const void *, __SIZE_TYPE__);
 struct in6_addr {
   struct {
     int u6_addr32[4];
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]