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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr45982.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-std=c99" } */
3
 
4
#include <stdint.h>
5
 
6
extern void abort (void);
7
 
8
uintptr_t __attribute__((pure,noinline,noclone))
9
foo (int *a)
10
{
11
  return (uintptr_t) a;
12
}
13
 
14
void __attribute__((noinline,noclone))
15
bar (uintptr_t a)
16
{
17
  int *p = (int *)a;
18
  *p = 1;
19
}
20
 
21
int main()
22
{
23
  int t = 0;
24
  bar (foo (&t));
25
  if (t != 1)
26
    abort ();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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