gcc/
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / pr42224.c
blobc1ccf28d5a8e752fbbcf4ca4d4917e11a71871c8
2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
5 typedef char* __char_ptr32 __attribute__ (( mode (SI) ));
6 typedef __char_ptr32 *__char_ptr_char_ptr32 __attribute__ ((mode (SI)));
8 void to_ptr32 (int x)
10 __char_ptr32 ptr = (__char_ptr32) x;
13 void to_int (__char_ptr32 ptr)
15 int x = (int) ptr;
18 __char_ptr_char_ptr32
19 to_ptr32_ptr32 (char **ptr64)
21 int argc;
22 __char_ptr_char_ptr32 short_argv;
24 for (argc=0; ptr64[argc]; argc++);
26 short_argv = (__char_ptr_char_ptr32) malloc32
27 (sizeof (__char_ptr32) * (argc + 1));
29 for (argc=0; ptr64[argc]; argc++)
30 short_argv[argc] = (__char_ptr32) strdup32 (ptr64[argc]);
32 short_argv[argc] = (__char_ptr32) 0;
33 return short_argv;