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]

emit_group_load_1 fix


PR 18118 has a testcase that tickles a bug in emit_group_load_1 on
powerpc-linux.

pr181180.c: In function 'main':
pr181180.c:14: internal compiler error: in int_mode_for_mode, at stor-layout.c:251

emit_group_load_1 gets in a twist over
orig_src = (const_int -9064531639303929855 [0x8234508000000001])
which of course is VOIDmode.

	* expr.c (emit_group_load_1): Don't die on const_int orig_src.

Bootstrap and regression test in progress.

Index: gcc/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.745
diff -u -p -r1.745 expr.c
--- gcc/expr.c	29 Nov 2004 00:52:33 -0000	1.745
+++ gcc/expr.c	29 Nov 2004 10:46:15 -0000
@@ -1570,8 +1570,10 @@ emit_group_load_1 (rtx *tmps, rtx dst, r
 
   gcc_assert (GET_CODE (dst) == PARALLEL);
 
-  if (!SCALAR_INT_MODE_P (m)
-      && !MEM_P (orig_src) && GET_CODE (orig_src) != CONCAT)
+  if (m != VOIDmode
+      && !SCALAR_INT_MODE_P (m)
+      && !MEM_P (orig_src)
+      && GET_CODE (orig_src) != CONCAT)
     {
       enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src));
       if (imode == BLKmode)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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