This is the mail archive of the gcc-bugs@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]

[Bug middle-end/24950] [3.4/4.0/4.1/4.2 Regression] ICE in operand_subword_force



------- Comment #6 from amodra at bigpond dot net dot au  2005-11-21 07:08 -------
Testing a fix.  The reason gcc-3.3 doesn't fail on this testcase is that the
first arg to store_bit_field there is a mem:BLK while gcc-3.4 and gcc-4 pass a
mem:SI.  Code after the following comment in store_bit_field fails badly,
trying to insert a 64-bit field into an SImode reg.

          /* Get the mode to use for inserting into this field.  If OP0 is
             BLKmode, get the smallest mode consistent with the alignment. If
             OP0 is a non-BLKmode object that is no wider than MAXMODE, use its
             mode. Otherwise, use the smallest mode containing the field.  */

I think we just need to check that bestmode is at least as big as fieldmode. 
This will prevent trying to use insv, and fall thru to store_fixed_bit_field,
which is what happens with a BLKmode MEM.


-- 

amodra at bigpond dot net dot au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-11-21 01:53:20         |2005-11-21 07:08:37
               date|                            |
   Target Milestone|4.0.3                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24950


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