diff options
author | saaadhu <saaadhu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-25 11:55:45 +0000 |
---|---|---|
committer | saaadhu <saaadhu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-25 11:55:45 +0000 |
commit | 1660595b07f5f618405c23a11af6160eef5b23e2 (patch) | |
tree | 326b03a840b7f7338dfe4d31d50dfc5bee2f1c60 | |
parent | f81d7a3815c8490bfb64956964e5189ab5577578 (diff) |
Fix tests for targets with sizeof(int) != 32.
gcc/testsuite/
* gcc.dg/torture/pr69352.c (foo): Cast to intptr_t instead of long.
* gcc.dg/torture/pr69771.c: Require int32plus.
* gcc.dg/torture/pr71866.c (inb): Add cast to intptr_t.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238708 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr69352.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr69771.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr71866.c | 3 |
4 files changed, 12 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcbc5c3e24e..b8076b8eb34 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2016-07-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> + + * gcc.dg/torture/pr69352.c (foo): Cast to intptr_t instead of long. + * gcc.dg/torture/pr69771.c: Require int32plus. + * gcc.dg/torture/pr71866.c (inb): Add cast to intptr_t. + 2016-07-25 Martin Liska <mliska@suse.cz> * gcc.dg/torture/pr71987.c: New test. diff --git a/gcc/testsuite/gcc.dg/torture/pr69352.c b/gcc/testsuite/gcc.dg/torture/pr69352.c index ad718b9e644..12f7f91c2e6 100644 --- a/gcc/testsuite/gcc.dg/torture/pr69352.c +++ b/gcc/testsuite/gcc.dg/torture/pr69352.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ +#include <stdint.h> + int a[10][14], b, c, d, e, f, g, h, i; void bar (void); int @@ -13,7 +15,7 @@ foo (int x) else m = 13; if (a[x][m]) - l = (long) foo; + l = (intptr_t) foo; a[x][i] = l; while (c) { diff --git a/gcc/testsuite/gcc.dg/torture/pr69771.c b/gcc/testsuite/gcc.dg/torture/pr69771.c index 8314c82c764..d03cbba668f 100644 --- a/gcc/testsuite/gcc.dg/torture/pr69771.c +++ b/gcc/testsuite/gcc.dg/torture/pr69771.c @@ -1,5 +1,6 @@ /* PR rtl-optimization/69771 */ /* { dg-do compile } */ +/* { dg-require-effective-target int32plus } */ unsigned char a = 5, c; unsigned short b = 0; diff --git a/gcc/testsuite/gcc.dg/torture/pr71866.c b/gcc/testsuite/gcc.dg/torture/pr71866.c index e1b36cb8b7d..4d71e09f22a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr71866.c +++ b/gcc/testsuite/gcc.dg/torture/pr71866.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-additional-options "-ftree-pre -fcode-hoisting" } */ +#include <stdint.h> typedef unsigned char u8; extern unsigned long pci_io_base; u8 in_8 (const volatile void *); @@ -25,7 +26,7 @@ u8 readb (const volatile void * addr) static inline u8 inb (unsigned long port) { - return readb((volatile void *)pci_io_base + port); + return readb((volatile void *)(intptr_t)pci_io_base + port); } static inline void outb (u8 val, unsigned long port) |