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/] [20040204-1.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 "-O1 -fdump-tree-optimized" } */
3
 
4
extern void link_error (void);
5
 
6
/*
7
  test that a condition  is propagated  inside an if
8
*/
9
 
10
void test5 (int x)
11
{
12
  extern int foo (int);
13
  if (x == 0)
14
    foo (x);
15
  else if (x == 0 )
16
    link_error ();
17
}
18
 
19
void test55 (int x, int y)
20
{
21
  int u;
22
  if (x == 5 && y)
23
    {
24
      u = x + 22;
25
      if (u != 27)
26
        link_error ();
27
    }
28
}
29
 
30
/* There should be not link_error calls, if there is any the
31
   optimization has failed */
32
/* ??? Ug.  This one may or may not fail based on how fold decides
33
   that the && should be emitted (based on BRANCH_COST).  Fix this
34
   by teaching dom to look through && and register all components
35
   as true.  */
36
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "powerpc*-*-* cris-*-* crisv32-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-*" } } } } */
37
/* { 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.