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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20070302-1.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O2" } */
3
 
4
struct A
5
{
6
  int x;
7
  float y;
8
};
9
 
10
volatile float X, Y;
11
 
12
int __attribute__ ((__noinline__))
13
baz (struct A *z, struct A *y)
14
{
15
  z->x = (int) X;
16
  z->y = Y;
17
  y->x = (int) X;
18
  y->y = Y;
19
}
20
 
21
 
22
struct A B;
23
 
24
float foo (int i)
25
{
26
  struct A *p, x, y, z;
27
 
28
  p = (i > 10) ? &x : &z;
29
  x.y = 3.0;
30
  p->x += baz (&z, &y);
31
  X = z.y;
32
  Y = p->y;
33
 
34
  /* This predicate should always evaluate to false.  The call to
35
     baz() is not a clobbering site for x.y.  The operand scanner was
36
     considering it a clobbering site for x.y because x.y is in the
37
     alias set of a call-clobbered memory tag.  */
38
  if (x.y != 3.0)
39
    link_error ();
40
}
41
 
42
main(int argc, char **argv)
43
{
44
  foo (argc);
45
}

powered by: WebSVN 2.1.0

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