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]

Re: loc_mentioned_in_p invokes undefined behavior


On Nov  8, 2007, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:

>> Given this additional investigation, I propose that the patch goes in
>> as I first posted it.

> I conducted it too before answering your initial message.  There is no 
> undefined behavior, the predicate was written ages ago for reload, let's
> not take any gratuitous risk here.

I don't see any risk whatsoever.  All 3 uses are evidently dealing
with rtx.  Do you know of something I don't?  I wouldn't mind turning
the predicate into a void*, if that would make you more comfortable
about risk management, but just changing the XVECEXP test while
leaving a known inconsistency behind seems like bad engineering
practice to me.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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