OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [s390/] [pr42224.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
 
2
/* { dg-do compile } */
3
/* { dg-options "-O0" } */
4
 
5
typedef char* __char_ptr32 __attribute__ (( mode (SI) ));
6
typedef __char_ptr32 *__char_ptr_char_ptr32 __attribute__ ((mode (SI)));
7
 
8
void to_ptr32 (int x)
9
{
10
  __char_ptr32 ptr = (__char_ptr32) x;
11
}
12
 
13
void to_int (__char_ptr32 ptr)
14
{
15
  int x = (int) ptr;
16
}
17
 
18
__char_ptr_char_ptr32
19
to_ptr32_ptr32 (char **ptr64)
20
{
21
  int argc;
22
  __char_ptr_char_ptr32 short_argv;
23
 
24
  for (argc=0; ptr64[argc]; argc++);
25
 
26
  short_argv = (__char_ptr_char_ptr32) malloc32
27
    (sizeof (__char_ptr32) * (argc + 1));
28
 
29
  for (argc=0; ptr64[argc]; argc++)
30
    short_argv[argc] = (__char_ptr32) strdup32 (ptr64[argc]);
31
 
32
  short_argv[argc] = (__char_ptr32) 0;
33
  return short_argv;
34
 
35
}
36
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.