re PR target/50092 (internal compiler error: in elimination_costs_in_insn, at reload1...
authorJakub Jelinek <jakub@redhat.com>
Thu, 18 Aug 2011 14:27:38 +0000 (16:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 18 Aug 2011 14:27:38 +0000 (16:27 +0200)
PR target/50092
* config/i386/i386.c (assign_386_stack_local): Call validize_mem
on the result before returning it.

* gcc.dg/torture/pr50092.c: New test.

From-SVN: r177859

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr50092.c [new file with mode: 0644]

index d7df631..1b5bc6c 100644 (file)
@@ -1,5 +1,9 @@
 2011-08-18  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/50092
+       * config/i386/i386.c (assign_386_stack_local): Call validize_mem
+       on the result before returning it.
+
        PR debug/50017
        * tree-vect-stmts.c (vect_finish_stmt_generation): If gsi_stmt (*gsi)
        is a debug stmt, use location of the first non-debug stmt after it.
index 3356cfd..fe3ceff 100644 (file)
@@ -21787,7 +21787,7 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
 
   for (s = ix86_stack_locals; s; s = s->next)
     if (s->mode == mode && s->n == n)
-      return copy_rtx (s->rtl);
+      return validize_mem (copy_rtx (s->rtl));
 
   s = ggc_alloc_stack_local_entry ();
   s->n = n;
@@ -21796,7 +21796,7 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
 
   s->next = ix86_stack_locals;
   ix86_stack_locals = s;
-  return s->rtl;
+  return validize_mem (s->rtl);
 }
 \f
 /* Calculate the length of the memory address in the instruction encoding.
index fa05947..76e8554 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-18  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/50092
+       * gcc.dg/torture/pr50092.c: New test.
+
 2011-08-18  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/50109
diff --git a/gcc/testsuite/gcc.dg/torture/pr50092.c b/gcc/testsuite/gcc.dg/torture/pr50092.c
new file mode 100644 (file)
index 0000000..c8a929b
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR target/50092 */
+/* { dg-do compile { target lp64 } } */
+
+volatile int v;
+
+void bar (long double);
+void baz (_Complex long double *);
+
+void
+foo (void)
+{
+  _Complex long double w[100000000];
+  bar ((long double) v / 2147483648.0);
+  baz (w);
+}