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/] [ssa-dse-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-dse1" } */
3
 
4
int
5
foo (int a, int b, int c)
6
{
7
  int *p;
8
  if (c)
9
    p = &a;
10
  else
11
    p = &b;
12
 
13
  *p = 3;
14
  *p = 4;
15
  return *p;
16
}
17
 
18
 
19
/* We should eliminate both assignments to *p.  */
20
/* { dg-final { scan-tree-dump-times " = 3" 0 "dse1"} } */
21
/* { dg-final { scan-tree-dump-times " = 4" 0 "dse1"} } */
22
 
23
/* The return *p should be turned into return 4.  */
24
/* { dg-final { scan-tree-dump-times " return 4" 1 "dse1"} } */
25
 
26
/* { dg-final { cleanup-tree-dump "dse1" } } */

powered by: WebSVN 2.1.0

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