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]

Patch: ICE: while compiling java/check-init.c in alpha 32.


-- 

===================================================
Donn Terry                  mailto:donn@interix.com
Softway Systems, Inc.        http://www.interix.com
2850 McClelland Dr, Ste. 1800   Ft.Collins CO 80525
Tel: +1-970-204-9900           Fax: +1-970-204-9951
===================================================
ICE: while compiling java/check-init.c in alpha 32.

Problem:

In the testcase below, the alloca() call returns a Pmode (DI)
result, but the target for the result is ptr_mode (SI) when on
32-bit Alpha.  convert_to_reg_mode doesn't actually "convert" if
the modes don't match.

Fix:

Call something stronger which does.

ChangeLog:
Fri Feb 19 22:27:02 1999  Donn Terry (donn@interix.com)
	* explow.c(allocate_dynamic_stack_space): Get type correct 
	when emiting code for alloca().

diff -urP egcs.source.old/gcc/explow.c egcs.source/gcc/explow.c
--- egcs.source.old/gcc/explow.c	Fri Feb 26 18:16:44 1999
+++ egcs.source/gcc/explow.c	Tue Mar  9 16:02:09 1999
@@ -1261,7 +1261,7 @@
       if (insn_operand_predicate[(int) CODE_FOR_allocate_stack][0]
 	  && ! ((*insn_operand_predicate[(int) CODE_FOR_allocate_stack][0])
 		(target, Pmode)))
-	target = copy_to_mode_reg (Pmode, target);
+	target = convert_to_mode (Pmode, target, 1);
       size = convert_modes (mode, ptr_mode, size, 1);
       if (insn_operand_predicate[(int) CODE_FOR_allocate_stack][1]
 	  && ! ((*insn_operand_predicate[(int) CODE_FOR_allocate_stack][1])


Code extracted from java/check-init.c

int num_current_words = 1;
typedef unsigned int word;
typedef word *words;
static void
check_bool2_init ()
{
  word buf[4];
  words tmp = num_current_words <= 1 ? buf
    : ((word*)__builtin_alloca  (( 4 * num_current_words ) * sizeof (word))) ;
}

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