aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
committerBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C68
1 files changed, 68 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C b/gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C
new file mode 100644
index 000000000..cc688a965
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C
@@ -0,0 +1,68 @@
+/* { dg-do compile } */
+/* { dg-options "-g -fcompare-debug -O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard" } */
+
+extern void *f1 (unsigned long, unsigned long);
+extern const struct line_map *f2 (void *, int, unsigned int, const char *, unsigned int);
+extern unsigned int f3 (void *, unsigned int);
+extern void *v1;
+struct B { const char *s; int t; };
+struct C { unsigned u; unsigned long long v; void *w; };
+unsigned long long f4 (struct C *);
+const char *f5 (void *, unsigned int, unsigned int *);
+unsigned long long f6 (void *);
+
+static inline unsigned long long
+f7 (struct C *x, unsigned y)
+{
+ unsigned long long a, b;
+ int u = x->u;
+ a = y == 64 ? -1ULL : (1ULL << y) - 1;
+ if (u + y > 64)
+ {
+ f6 (x->w);
+ x->u = y;
+ return b & a;
+ }
+ b = x->v;
+ b >>= u;
+ x->u = u + y;
+ return b & a;
+}
+
+static const char *
+f8 (const char *x)
+{
+ B **a;
+ unsigned long t = __builtin_strlen (x);
+ char *b;
+ struct B *c;
+ b = (char *) f1 (t + 1, 1);
+ c = (struct B *) f1 (1, sizeof (struct B));
+ __builtin_memcpy (b, x, t + 1);
+ c->t = t;
+ struct B *d = *a;
+ return d->s;
+}
+
+unsigned int
+f9 (struct C *x, void *y)
+{
+ static const char *a;
+ static int b;
+ static int c;
+ bool d, e, f;
+ unsigned t;
+ bool prev_file = a != __null;
+ if (f7 (x, 1))
+ return ((unsigned int) 0);
+ d = f7 (x, 1);
+ e = f7 (x, 1);
+ f = f7 (x, 1);
+ a = f8 (f5 (y, f4 (x), &t));
+ if (e) b = f4 (x);
+ if (f)
+ if (d)
+ if (prev_file)
+ f2 (v1, 1, false, __null, 0);
+ return f3 (v1, c);
+}