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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020529-1.c] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* PR target/6838 from cato@df.lth.se.
/* PR target/6838 from cato@df.lth.se.
   cris-elf got an ICE with -O2: the insn matching
   cris-elf got an ICE with -O2: the insn matching
      (insn 49 48 52 (parallel[
      (insn 49 48 52 (parallel[
                  (set (mem/s:HI (plus:SI (reg/v/f:SI 0 r0 [24])
                  (set (mem/s:HI (plus:SI (reg/v/f:SI 0 r0 [24])
                              (const_int 8 [0x8])) [5 <variable>.c+0 S2 A8])
                              (const_int 8 [0x8])) [5 <variable>.c+0 S2 A8])
                      (reg:HI 2 r2 [27]))
                      (reg:HI 2 r2 [27]))
                  (set (reg/f:SI 2 r2 [31])
                  (set (reg/f:SI 2 r2 [31])
                      (plus:SI (reg/v/f:SI 0 r0 [24])
                      (plus:SI (reg/v/f:SI 0 r0 [24])
                          (const_int 8 [0x8])))
                          (const_int 8 [0x8])))
              ] ) 24 {*mov_sidehi_mem} (nil)
              ] ) 24 {*mov_sidehi_mem} (nil)
          (nil))
          (nil))
   forced a splitter through the output pattern "#", but there was no
   forced a splitter through the output pattern "#", but there was no
   matching splitter.  */
   matching splitter.  */
 
 
struct xx
struct xx
 {
 {
   int a;
   int a;
   struct xx *b;
   struct xx *b;
   short c;
   short c;
 };
 };
 
 
int f1 (struct xx *);
int f1 (struct xx *);
void f2 (void);
void f2 (void);
 
 
int
int
foo (struct xx *p, int b, int c, int d)
foo (struct xx *p, int b, int c, int d)
{
{
  int a;
  int a;
 
 
  for (;;)
  for (;;)
    {
    {
      a = f1(p);
      a = f1(p);
      if (a)
      if (a)
        return (0);
        return (0);
      if (b)
      if (b)
        continue;
        continue;
      p->c = d;
      p->c = d;
      if (p->a)
      if (p->a)
        f2 ();
        f2 ();
      if (c)
      if (c)
        f2 ();
        f2 ();
      d = p->c;
      d = p->c;
      switch (a)
      switch (a)
        {
        {
        case 1:
        case 1:
          if (p->b)
          if (p->b)
            f2 ();
            f2 ();
          if (c)
          if (c)
            f2 ();
            f2 ();
        default:
        default:
          break;
          break;
        }
        }
    }
    }
  return d;
  return d;
}
}
 
 
int main (void)
int main (void)
{
{
  struct xx s = {0, &s, 23};
  struct xx s = {0, &s, 23};
  if (foo (&s, 0, 0, 0) != 0 || s.a != 0 || s.b != &s || s.c != 0)
  if (foo (&s, 0, 0, 0) != 0 || s.a != 0 || s.b != &s || s.c != 0)
    abort ();
    abort ();
  exit (0);
  exit (0);
}
}
 
 
int
int
f1 (struct xx *p)
f1 (struct xx *p)
{
{
  static int beenhere = 0;
  static int beenhere = 0;
  if (beenhere++ > 1)
  if (beenhere++ > 1)
    abort ();
    abort ();
  return beenhere > 1;
  return beenhere > 1;
}
}
 
 
void
void
f2 (void)
f2 (void)
{
{
  abort ();
  abort ();
}
}
 
 

powered by: WebSVN 2.1.0

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