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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr36373-10.c] - Blame information for rev 816

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
4
typedef unsigned long long uintptr_t;
5
#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
6
typedef unsigned long uintptr_t;
7
#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
8
typedef unsigned int uintptr_t;
9
#else
10
#error Add target support here
11
#endif
12
 
13
void __attribute__((noinline))
14
foo(uintptr_t l)
15
{
16
  int *p = (int *)l;
17
  *p = 1;
18
}
19
 
20
extern void abort (void);
21
int main()
22
{
23
  int b = 0;
24
  uintptr_t l = (uintptr_t)&b;
25
  foo(l);
26
  if (b != 1)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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