summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhutchinsonandy <hutchinsonandy@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-03 03:24:38 +0000
committerhutchinsonandy <hutchinsonandy@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-03 03:24:38 +0000
commit2a95015b40549ee2f4eacfcd28dc6e2f55adb908 (patch)
tree6c36adb6a7a6b23602509122d64785d6d4fca883
parent53200162d9ee14633f53f14e03aa565941551dc6 (diff)
downloadgcc-2a95015b40549ee2f4eacfcd28dc6e2f55adb908.tar.gz
*gcc.c-torture/execute/pr40668.c: Correct for 16bit int size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153835 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr40668.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6578d40c399..26c04dcfa48 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+ 2009-11-02 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
+
+ *gcc.c-torture/execute/pr40668.c: Correct for 16bit int size.
+
2009-11-02 Dodji Seketeli <dodji@redhat.com>
PR c++/41856
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr40668.c b/gcc/testsuite/gcc.c-torture/execute/pr40668.c
index 70fe63f8916..b860dd7c9ec 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr40668.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr40668.c
@@ -1,3 +1,8 @@
+#if (__SIZEOF_INT__ == 2)
+#define TESTVALUE 0x1234
+#else
+#define TESTVALUE 0x12345678
+#endif
static void
foo (unsigned int x, void *p)
{
@@ -10,7 +15,7 @@ bar (int type, void *number)
switch (type)
{
case 1:
- foo (0x12345678, number);
+ foo (TESTVALUE, number);
break;
case 7:
foo (0, number);
@@ -29,7 +34,7 @@ main (void)
{
unsigned int x;
bar (1, &x);
- if (x != 0x12345678)
+ if (x != TESTVALUE)
__builtin_abort ();
return 0;
}