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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [ultrasp4.c] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* Simplified from PR target/5309.  */
2
/* { dg-do compile } */
3
/* { dg-options "-O2" } */
4
/* { dg-options "-O2 -mcpu=ultrasparc" { target sparc64-*-* sparcv9-*-* } } */
5
 
6
#if __INT_MAX__ > 32767
7
#define PTR_TYPE long
8
#else
9
/* For 16-bit ports a long is a 32-bit quantity.  So you cannot
10
   cast a 32-bit long integer into a pointer which will only be
11
   16-bits long.  */
12
#define PTR_TYPE int
13
#endif
14
 
15
extern PTR_TYPE bar (unsigned int);
16
 
17
PTR_TYPE
18
foo (PTR_TYPE x, unsigned int y)
19
{
20
  return *(((PTR_TYPE *) (bar (y) - 1)) + 1 + (x >> 2) % 359);
21
}

powered by: WebSVN 2.1.0

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