Fix bogus pr78886.c failure for avr
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Wed, 17 May 2017 05:50:37 +0000 (05:50 +0000)
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>
Wed, 17 May 2017 05:50:37 +0000 (05:50 +0000)
The test fails for avr because malloc has been declared to take
an unsigned long, whereas size_t for avr is only unsigned int.

Fixed by typedef'ing __SIZE_TYPE__ to size_t and using it in the
malloc function declaration.

gcc/testsuite/

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

* gcc.dg/tree-ssa/pr78886.c: Use __SIZE_TYPE__ instead of
unsigned long.

From-SVN: r248138

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr78886.c

index dea167f61a5fc2a977bc927f917c8d6555283bae..c4f76871aee7c5e164b6f566c257cf491554881b 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-17  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+       * gcc.dg/tree-ssa/pr78886.c: Use __SIZE_TYPE__ instead of
+       unsigned long.
+
 2017-05-17  Chenghua Xu  <paul.hua.gm@gmail.com>
 
        * gcc.target/mips/reorgbug-1.c: Don't specify -O2.
index 97799301547bb60be4edb74f52f3c2469d2d876b..de22b83ad25750e52af32ca74500be197fce8e3a 100644 (file)
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
-void *malloc(unsigned long x);
+
+__extension__ typedef __SIZE_TYPE__ size_t;
+void *malloc(size_t x);
 
 void foo(void)
 {