------- Comment #5 from jamborm at gcc dot gnu dot org  2010-01-12 21:05 -------
I would say that the dd.c[4] access into an array that is four chars
long has undefined behavior.  It is also the reason why
build_ref_for_offset cannot find a suitable array element for it,
because there is none.

Because we should not ICE anyway I guess I'll resort to pro-actively
checking that we can create an access to the original piece of the
aggregate when deciding what replacements to create.  (That is a bit
pity as the asserts nicely checked that the function worked in the
cases when it really should.)

Another option (as Andrew has just suggested on IRC) would be to turn
such things into __builtin_trap().  That would teach them not to write
code like this, <evil grin>.


-- 

jamborm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jamborm at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-01-12 14:13:18         |2010-01-12 21:05:19
               date|                            |


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

Reply via email to