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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20020701-1.c] - Blame information for rev 856

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR target/7177
2
   Problem with cris-axis-elf: ICE in global.
3
   Origin: hp@axis.com.  */
4
 
5
typedef __SIZE_TYPE__ size_t;
6
void f1 (void *);
7
char *f2 (const char *);
8
int atoi (const char *);
9
char *strchr (const char *, int);
10
int strcmp (const char *, const char *);
11
size_t strlen (const char *);
12
typedef enum { A, B, C } t1;
13
extern const char _v[];
14
 
15
static t1
16
f (const char* p1, const char* p2, char p3)
17
{
18
  char *v1;
19
  char *v2;
20
  char *a;
21
  char *v3;
22
  char *v4;
23
  char *v5;
24
  char *e;
25
  char *v6;
26
  t1 r = C;
27
 
28
  v1 = f2 (p2);
29
  v4 = f2 (p1);
30
 
31
  a = v2 = v1;
32
  e = v5 = v4;
33
  memcpy (&e, &e, sizeof (e));
34
 
35
  v3 = strchr (v2, ',');
36
  v6 = strchr (v5, ',');
37
 
38
  while ((_v + 1)[(unsigned) *a] & 4)
39
    a++;
40
  while ((_v + 1)[(unsigned) *e] & 4)
41
    e++;
42
 
43
  if (a == v3 && e == v6)
44
    {
45
      if (p3)
46
        r = atoi (v5) < atoi (v2) ? B : A;
47
      else
48
        r = atoi (v5) > atoi (v2) ? B : A;
49
      v2 = ++a;
50
      v5 = ++e;
51
      v3 = strchr (v2, ',');
52
      v6 = strchr (v5, ',');
53
 
54
      while ((_v + 1)[(unsigned) *a] & 4)
55
        a++;
56
      while ((_v + 1)[(unsigned) *e] & 4)
57
        e++;
58
 
59
      if (a == v3 && e == v6)
60
        {
61
          if (r == B)
62
            r = B;
63
          else if (p3)
64
            r = atoi (v5) < atoi (v2) ? B : A;
65
          else
66
            r = atoi (v5) > atoi (v2) ? B : A;
67
        }
68
      else
69
        r = C;
70
    }
71
 
72
  f1 (v1);
73
  f1 (v4);
74
  return r;
75
}

powered by: WebSVN 2.1.0

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