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

Message ID 65d87003-38cc-a923-1089-6aaa824bb7d9@mittosystems.com
State New
Headers show
Series
  • [committed] Fix type of "num" argument to memcpy in gcc.c-torture/compile/pr65595.c
Related show

Commit Message

Jozef Lawrynowicz Nov. 7, 2018, 10:33 p.m.
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.

Patch

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