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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [restrict-1.c] - Blame information for rev 315

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

Line No. Rev Author Line
1 297 jeremybenn
/*  PR rtl-optimization/16536
2
    Origin:  Jeremy Denise      <jeremy.denise@libertysurf.fr>
3
    Reduced: Wolfgang Bangerth  <bangerth@dealii.org>
4
             Volker Reichelt    <reichelt@igpm.rwth-aachen.de>  */
5
 
6
extern void abort ();
7
 
8
typedef struct
9
{
10
  int i, dummy;
11
} A;
12
 
13
inline A foo (const A* p, const A* q)
14
{
15
  return (A){p->i+q->i};
16
}
17
 
18
void bar (A* __restrict__ p)
19
{
20
  *p=foo(p,p);
21
  if (p->i!=2)
22
    abort();
23
}
24
 
25
int main ()
26
{
27
  A a={1};
28
  bar(&a);
29
  return 0;
30
}

powered by: WebSVN 2.1.0

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