Fix warnings occured during profiledboostrap on
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20020701-1.c
blob1258cec28b765f4d86aad7e41c5ad57c2f27d2d6
1 /* PR target/7177
2 Problem with cris-axis-elf: ICE in global.
3 Origin: hp@axis.com. */
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[];
15 static t1
16 f (const char* p1, const char* p2, char p3)
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;
28 v1 = f2 (p2);
29 v4 = f2 (p1);
31 a = v2 = v1;
32 e = v5 = v4;
33 memcpy (&e, &e, sizeof (e));
35 v3 = strchr (v2, ',');
36 v6 = strchr (v5, ',');
38 while ((_v + 1)[(unsigned) *a] & 4)
39 a++;
40 while ((_v + 1)[(unsigned) *e] & 4)
41 e++;
43 if (a == v3 && e == v6)
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, ',');
54 while ((_v + 1)[(unsigned) *a] & 4)
55 a++;
56 while ((_v + 1)[(unsigned) *e] & 4)
57 e++;
59 if (a == v3 && e == v6)
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;
68 else
69 r = C;
72 f1 (v1);
73 f1 (v4);
74 return r;