diff mbox

[testsuite] Fix bogus pr78138.c failure for avr

Message ID 87y3ufr4wu.fsf@microchip.com
State New
Headers show

Commit Message

Senthil Kumar Selvaraj May 2, 2017, 9:20 a.m. UTC
Hi,

  The trivial patch below fixes a bogus testsuite failure
  (gcc.dg/pr78138.c) for the avr target.

  The declaration for memcpy had the size parameter declared as 
  unsigned long. For avr, __SIZE_TYPE__ is unsigned int, and 
  this caused a builtin-declaration-mismatch warning, resulting
  in a couple of FAILs.

  The patch fixes that by typedef'ing __SIZE_TYPE__ to size_t and
  using size_t as the type for memcpy's third parameter.

  Committed to trunk as obvious.

Regards
Senthil

gcc/testsuite/ChangeLog

2017-05-02  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/pr78138.c: Use __SIZE_TYPE__ instead of
	unsigned long.
diff mbox

Patch

Index: gcc.dg/pr78138.c
===================================================================
--- gcc.dg/pr78138.c	(revision 247481)
+++ gcc.dg/pr78138.c	(working copy)
@@ -5,7 +5,9 @@ 
 
 char d [5];
 
-void* memcpy (void*, const void*, unsigned long);
+__extension__ typedef __SIZE_TYPE__ size_t;
+
+void* memcpy (void*, const void*, size_t);
 extern char* strcpy (char*, const char*);
 
 void f (int i, int j)