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/] [pr26180.c] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
/* { dg-require-effective-target int32plus } */
4
 
5
void abort(void);
6
int bar(int x, int y)
7
{
8
    int x1, y1;
9
    int x2, y2;
10
    unsigned int x3, y3, w;
11
    int z = 1;
12
 
13
    x1 = (x < (1 << 30));
14
    y1 = (y < (1 << 30));
15
    if (x1)
16
    if (y1) {
17
        x2 = ((x > 0)? (x): -(x));
18
        y2 = ((y > 0)? (y): -(y));
19
 
20
        x3 = x2;
21
        y3 = y2;
22
        w = x3 * y3;
23
 
24
        if (w >= (1 << 30)) {
25
          z = 1;
26
        } else    {
27
          z = -1;
28
        }
29
    }
30
 
31
        return z;
32
}
33
 
34
 
35
int main()
36
{
37
  int x, y, z;
38
  x = 536870912;  /* 2^29 */
39
  y = 2;
40
  z = bar(x, y);
41
  if (z != 1)
42
    abort ();
43
  return 0;
44
}

powered by: WebSVN 2.1.0

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