From: Georg-Johann Lay Date: Wed, 16 May 2012 12:46:36 +0000 (+0000) Subject: re PR testsuite/52641 (Test cases fail for 16-bit int targets) X-Git-Tag: misc/gccgo-go1_1_2~2854 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=219d42f11a5f65265b8dda0ab4cb354746c3f456;p=thirdparty%2Fgcc.git re PR testsuite/52641 (Test cases fail for 16-bit int targets) PR testsuite/52641 * gcc.dg/pr52549.c: Fix test for long != void* * gcc.c-torture/execute/pr52979-1.x: New file. * gcc.c-torture/execute/pr52979-2.x: New file. From-SVN: r187588 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ac4f287af0fd..d1efffc1d423 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-05-16 Georg-Johann Lay + + PR testsuite/52641 + * gcc.dg/pr52549.c: Fix test for long != void* + * gcc.c-torture/execute/pr52979-1.x: New file. + * gcc.c-torture/execute/pr52979-2.x: New file. + 2012-05-16 Dodji Seketeli PR preprocessor/7263 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x new file mode 100644 index 000000000000..4efed4c325fd --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x @@ -0,0 +1,7 @@ +load_lib target-supports.exp + +if { [check_effective_target_int32plus] } { + return 0 +} + +return 1; diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x new file mode 100644 index 000000000000..4efed4c325fd --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x @@ -0,0 +1,7 @@ +load_lib target-supports.exp + +if { [check_effective_target_int32plus] } { + return 0 +} + +return 1; diff --git a/gcc/testsuite/gcc.dg/pr52549.c b/gcc/testsuite/gcc.dg/pr52549.c index 89ec2aaf6cc3..382f77d05940 100644 --- a/gcc/testsuite/gcc.dg/pr52549.c +++ b/gcc/testsuite/gcc.dg/pr52549.c @@ -1,6 +1,13 @@ /* { dg-do compile } */ +#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ _mark (long obj, int i, char *a) { (char *)&(((long *)(obj)) [i]) - a; } +#elif __SIZEOF_POINTER__ == __SIZEOF_INT__ +_mark (int obj, int i, char *a) +{ + (char *)&(((int *)(obj)) [i]) - a; +} +#endif