From: Ulrich Weigand Date: Wed, 2 Dec 2009 13:58:02 +0000 (+0000) Subject: Forgot to add file with last commit. X-Git-Tag: upstream/12.2.0~95705 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08786603380899fba854e801047e187f21d92b37;p=platform%2Fupstream%2Fgcc.git Forgot to add file with last commit. From-SVN: r154909 --- diff --git a/gcc/testsuite/gcc.target/s390/pr42224.c b/gcc/testsuite/gcc.target/s390/pr42224.c new file mode 100644 index 0000000..c1ccf28 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr42224.c @@ -0,0 +1,36 @@ + +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +typedef char* __char_ptr32 __attribute__ (( mode (SI) )); +typedef __char_ptr32 *__char_ptr_char_ptr32 __attribute__ ((mode (SI))); + +void to_ptr32 (int x) +{ + __char_ptr32 ptr = (__char_ptr32) x; +} + +void to_int (__char_ptr32 ptr) +{ + int x = (int) ptr; +} + +__char_ptr_char_ptr32 +to_ptr32_ptr32 (char **ptr64) +{ + int argc; + __char_ptr_char_ptr32 short_argv; + + for (argc=0; ptr64[argc]; argc++); + + short_argv = (__char_ptr_char_ptr32) malloc32 + (sizeof (__char_ptr32) * (argc + 1)); + + for (argc=0; ptr64[argc]; argc++) + short_argv[argc] = (__char_ptr32) strdup32 (ptr64[argc]); + + short_argv[argc] = (__char_ptr32) 0; + return short_argv; + +} +