From 2a95015b40549ee2f4eacfcd28dc6e2f55adb908 Mon Sep 17 00:00:00 2001 From: hutchinsonandy Date: Tue, 3 Nov 2009 03:24:38 +0000 Subject: [PATCH] *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 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/execute/pr40668.c | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6578d40..26c04dc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ + 2009-11-02 Andy Hutchinson + + *gcc.c-torture/execute/pr40668.c: Correct for 16bit int size. + 2009-11-02 Dodji Seketeli PR c++/41856 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr40668.c b/gcc/testsuite/gcc.c-torture/execute/pr40668.c index 70fe63f..b860dd7 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; } -- 2.7.4