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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20040204-1.c] - Diff between revs 816 and 826

Only display areas with differences | Details | Blame | View Log

Rev 816 Rev 826
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
 
 
extern void link_error (void);
extern void link_error (void);
 
 
/*
/*
  test that a condition  is propagated  inside an if
  test that a condition  is propagated  inside an if
*/
*/
 
 
void test5 (int x)
void test5 (int x)
{
{
  extern int foo (int);
  extern int foo (int);
  if (x == 0)
  if (x == 0)
    foo (x);
    foo (x);
  else if (x == 0 )
  else if (x == 0 )
    link_error ();
    link_error ();
}
}
 
 
void test55 (int x, int y)
void test55 (int x, int y)
{
{
  int u;
  int u;
  if (x == 5 && y)
  if (x == 5 && y)
    {
    {
      u = x + 22;
      u = x + 22;
      if (u != 27)
      if (u != 27)
        link_error ();
        link_error ();
    }
    }
}
}
 
 
/* There should be not link_error calls, if there is any the
/* There should be not link_error calls, if there is any the
   optimization has failed */
   optimization has failed */
/* ??? Ug.  This one may or may not fail based on how fold decides
/* ??? Ug.  This one may or may not fail based on how fold decides
   that the && should be emitted (based on BRANCH_COST).  Fix this
   that the && should be emitted (based on BRANCH_COST).  Fix this
   by teaching dom to look through && and register all components
   by teaching dom to look through && and register all components
   as true.  */
   as true.  */
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "powerpc*-*-* cris-*-* crisv32-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-*" } } } } */
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "powerpc*-*-* cris-*-* crisv32-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-*" } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
/* { 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.