This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testcase] Alpha reload ICE


Hi!

The following testcase ICEs on Alpha at -O2/-O3.
The problem is that both mul/div and indirect function call wants to use
$27 at once, because schedule puts the div/mod instructions in between
these 2:

(insn 38 36 39 (set (reg:DI 27 $27)
        (reg/f:DI 82)) 238 {*movdi_nofix} (insn_list 32 (nil))
    (expr_list:REG_DEAD (reg/f:DI 82)
        (nil)))

(call_insn 39 38 40 (parallel[
            (call (mem:DI (reg:DI 27 $27) [0 S8 A64])
                (const_int 0 [0x0]))
            (use (reg:DI 29 $29))
            (clobber (reg:DI 26 $26))
        ] ) 204 {*call_osf_1}

Ok to commit?
Richard, any ideas on what can be done about this?

2001-12-18  Jakub Jelinek  <jakub@redhat.com>

	* gcc.c-torture/20011218-1.c: New test.

--- gcc/testsuite/gcc.c-torture/20011218-1.c.jj	Thu Aug 30 22:30:55 2001
+++ gcc/testsuite/gcc.c-torture/20011218-1.c	Tue Dec 18 16:04:33 2001
@@ -0,0 +1,12 @@
+struct S {
+  int a, b;
+  void (*f) (long, int);
+};
+
+void foo (struct S *x)
+{
+  long c = x->a * 50;
+  c /= (long) x->b;
+  c *= (long) x->b;
+  x->f (c, 0);
+}

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]