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]

[PATCH]: Fix ICE in convert_move on PA


> > > I have determined by elimination that the ifcvt pass reordering
> > > 
> > > Sat Oct 26 01:44:46 CEST 2002  Jan Hubicka  <jh@suse.cz>
> > > 
> > >         * toplev.c (dump_file_index): Add DFI_ce3.
> > > 	(dump_file_info): Likewise.
> > > 	(rest_of_compilation): Run first ifcvt pass before tracer.
> > > 
> > > results in the failure of g77.f-torture/execute/970625-2.f on the PA
> > > (hppa-unknown-linux-gnu, hppa2.0w-hp-hpux11* and hppa64-hp-hpux11*).
> > > 
> > > The following error occurs:
> > > 
> > > /home/dave/gcc-3.3/gcc/gcc/testsuite/g77.f-torture/execute/970625-2.f:74: internal compiler error: in convert_move, at expr.c:1303
> > > 
> > > We have
> > > Breakpoint 1, convert_move (to=0x401ba240, from=0x401ba270, unsignedp=0)
> > >     at ../../gcc/gcc/expr.c:1303
> > > 1303      abort ();
> > > (gdb) p debug_rtx (to)
> > > (reg:CCFP 142)
> > > $1 = void
> > > (gdb) p debug_rtx (from)
> > > (reg:SI 143)
> > Interesting.
> > This looks like latent PA bug uncovered, but I will try to check it next
> > week.

Here is a patch to fix the above.  It occurs as a result of the installation
of placeholders to set the CCFP register.  These were installed last
September to improve optimization of if statements on the PA.  Under some
circumstances, the CCFP register can become the destination for
the store flag from a general operand.  The enclosed patch restricts
setting the store flag to destinations with a mode class in MODE_INT.
Possibly, this is over restrictive but it seemed reasonable choice.

Tested on hppa64-hp-hpux11.11 with no regressions.

Ok for main and branch?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2003-01-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* ifcvt.c (noce_emit_store_flag): Don't emit store flag if mode class
	of destination is not MODE_INT.

Index: ifcvt.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.105
diff -u -3 -p -r1.105 ifcvt.c
--- ifcvt.c	19 Sep 2002 01:07:10 -0000	1.105
+++ ifcvt.c	18 Jan 2003 21:09:28 -0000
@@ -645,8 +645,8 @@ noce_emit_store_flag (if_info, x, revers
       end_sequence ();
     }
 
-  /* Don't even try if the comparison operands are weird.  */
-  if (cond_complex)
+  /* Don't even try if the comparison operands or the mode of X are weird.  */
+  if (cond_complex || GET_MODE_CLASS (GET_MODE (x)) != MODE_INT)
     return NULL_RTX;
 
   return emit_store_flag (x, code, XEXP (cond, 0),


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