Don't allow combine to make (zero_extend (const_int ..))

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Sat Mar 9 04:29:00 GMT 2002


Some fairly recent change caused combine to try to make an extension
of a CONST_INT and get an ICE from it when doing the second substitution.
This just produces a new CONST_INT instead.  The problem showed up
compiling the GNAT file xref_lib.adb for VMS.

Tested on alphaev56-dec-osf4.0c.

Committed on branch and trunk.

Sat Mar  9 07:20:01 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* combine.c (make_extraction): Don't make extension of CONST_INT.

*** combine.c	2002/03/08 10:55:56	1.267.2.1
--- combine.c	2002/03/09 12:18:51
*************** make_extraction (mode, inner, pos, pos_r
*** 6028,6031 ****
--- 6028,6034 ----
  	return new;
  
+       if (GET_CODE (new) == CONST_INT)
+ 	return trunc_int_for_mode (INTVAL (new), mode);
+ 
        /* If we know that no extraneous bits are set, and that the high
  	 bit is not set, convert the extraction to the cheaper of



More information about the Gcc-patches mailing list