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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [alias-2.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-O2 -fdump-tree-optimized" } */
2
static int a;
3
int f;
4
void bar (void)  __attribute__((noinline));
5
void bar (void)
6
{
7
  f = 9;
8
}
9
 
10
void link_error ();
11
 
12
int foo()
13
{
14
  int b, c;
15
  a = 5;
16
  b = a;
17
  bar ();
18
  b = b + a;
19
  if (b != 10)
20
    link_error ();
21
  return b;
22
}
23
 
24
/* We should have removed the link_error on the tree level as GCC can tell that
25
   a is not touched by the calling bar at all. */
26
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */
27
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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