Merge from trunk
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr59985.C
blobcc688a96533a2c2a40e970984628d2b3f32dfeda
1 /* { dg-do compile } */
2 /* { dg-options "-g -fcompare-debug -O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard" } */
4 extern void *f1 (unsigned long, unsigned long);
5 extern const struct line_map *f2 (void *, int, unsigned int, const char *, unsigned int);
6 extern unsigned int f3 (void *, unsigned int);
7 extern void *v1;
8 struct B { const char *s; int t; };
9 struct C { unsigned u; unsigned long long v; void *w; };
10 unsigned long long f4 (struct C *);
11 const char *f5 (void *, unsigned int, unsigned int *);
12 unsigned long long f6 (void *);
14 static inline unsigned long long
15 f7 (struct C *x, unsigned y)
17   unsigned long long a, b;
18   int u = x->u;
19   a = y == 64 ? -1ULL : (1ULL << y) - 1;
20   if (u + y > 64)
21     {
22       f6 (x->w);
23       x->u = y;
24       return b & a;
25     }
26   b = x->v;
27   b >>= u;
28   x->u = u + y;
29   return b & a;
32 static const char *
33 f8 (const char *x)
35   B **a;
36   unsigned long t = __builtin_strlen (x);
37   char *b;
38   struct B *c;
39   b = (char *) f1 (t + 1, 1);
40   c = (struct B *) f1 (1, sizeof (struct B));
41   __builtin_memcpy (b, x, t + 1);
42   c->t = t;
43   struct B *d = *a;
44   return d->s;
47 unsigned int
48 f9 (struct C *x, void *y)
50   static const char *a;
51   static int b;
52   static int c;
53   bool d, e, f;
54   unsigned t;
55   bool prev_file = a != __null;
56   if (f7 (x, 1))
57     return ((unsigned int) 0);
58   d = f7 (x, 1);
59   e = f7 (x, 1);
60   f = f7 (x, 1);
61   a = f8 (f5 (y, f4 (x), &t));
62   if (e) b = f4 (x);
63   if (f)
64     if (d)
65       if (prev_file)
66         f2 (v1, 1, false, __null, 0);
67   return f3 (v1, c);