aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2014-01-31 23:56:46 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2014-01-31 23:56:46 +0000
commit6334f3e99b0e24cdddf6dc6c72c4ce970791c1af (patch)
tree5e5480a634f05c28a3cab0845eb268ed9a4f6156 /gcc
parenteecd8b7c00ff2770b9899cb9c9de1addebdb6415 (diff)
downloadgcc-6334f3e99b0e24cdddf6dc6c72c4ce970791c1af.zip
gcc-6334f3e99b0e24cdddf6dc6c72c4ce970791c1af.tar.gz
gcc-6334f3e99b0e24cdddf6dc6c72c4ce970791c1af.tar.bz2
re PR bootstrap/59985 (stage2/3 compare error on lto-streamer-in.o)
2014-01-31 Vladimir Makarov <vmakarov@redhat.com> PR bootstrap/59985 * lra-constraints.c (process_alt_operands): Update reload_sum only on the first pass. 2014-01-31 Vladimir Makarov <vmakarov@redhat.com> PR bootstrap/59985 * gcc.target/arm/pr59985.C: New. From-SVN: r207375
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lra-constraints.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/arm/pr59985.C68
4 files changed, 84 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 93ebbb9..32eb882 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-31 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR bootstrap/59985
+ * lra-constraints.c (process_alt_operands): Update reload_sum only
+ on the first pass.
+
2014-01-31 Richard Henderson <rth@redhat.com>
PR middle-end/60004
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index cb64ee1..ada1baf 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -2178,7 +2178,11 @@ process_alt_operands (int only_alternative)
(operand_reg[nop])]
.last_reload);
- if (last_reload > bb_reload_num)
+ /* The value of reload_sum has sense only if we
+ process insns in their order. It happens only on
+ the first constraints sub-pass when we do most of
+ reload work. */
+ if (lra_constraint_iter == 1 && last_reload > bb_reload_num)
reload_sum += last_reload - bb_reload_num;
}
/* If this is a constant that is reloaded into the
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0f59583..b1a657a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-31 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR bootstrap/59985
+ * gcc.target/arm/pr59985.C: New.
+
2014-01-31 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/59410
diff --git a/gcc/testsuite/gcc.target/arm/pr59985.C b/gcc/testsuite/gcc.target/arm/pr59985.C
new file mode 100644
index 0000000..cc688a9
--- /dev/null
+++ b/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);
+}