OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr38572.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR tree-optimization/38572
2
// { dg-do compile }
3
// { dg-options "-O2" }
4
 
5
// Crash caused by the out-of-bounds enum values (all the remaining cruft
6
// is needed only to trigger the appropriate code path in tree-vrp.c).
7
enum JSOp
8
{
9
  JSOP_GETELEM = 5,
10
  JSOP_LIMIT
11
};
12
extern void g ();
13
void f (char *pc, char *endpc, int format, char ***fp, enum JSOp op)
14
{
15
  while (pc <= endpc)
16
    {
17
      if ((fp && *fp && pc == **fp) || pc == endpc)
18
        {
19
          if (format == 1)
20
            op = (JSOp) 256;
21
          else if (format == 2)
22
            op = (JSOp) 257;
23
          else
24
            op = JSOP_GETELEM;
25
        }
26
      if (op >= JSOP_LIMIT)
27
        {
28
          if (format)
29
            g ();
30
        }
31
    }
32
}

powered by: WebSVN 2.1.0

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