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.dg/] [tree-ssa/] [ssa-pre-25.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
3
 
4
struct X { int i; };
5
 
6
int foo (int x)
7
{
8
  struct X a;
9
  struct X b;
10
  struct X *p;
11
  a.i = 1;
12
  b.i = 2;
13
  if (x)
14
    p = &a;
15
  else
16
    p = &b;
17
  return p->i;
18
}
19
 
20
/* We should eliminate the load from p for a PHI node with values 1 and 2.  */
21
 
22
/* { dg-final { scan-tree-dump "Eliminated: 1" "pre" } } */
23
/* { dg-final { cleanup-tree-dump "pre" } } */

powered by: WebSVN 2.1.0

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