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]

Re: lcm assumes an insn is a note without testing


  In message <ory9y3dog6.fsf@guarana.lsd.ic.unicamp.br>you write:
  > --=-=-=
  > 
  > Caught this one with a sh-elf build with all checks enabled.  Looks
  > pretty obvious to me, so this hasn't undergone the standard
  > bootstrapping and testing procedure.  Ok to install?
  > 
  > 
  > --=-=-=
  > Content-Type: text/x-patch
  > Content-Disposition: inline; filename=lcm-dont-assume-note.patch
  > 
  > Index: gcc/ChangeLog
  > from  Alexandre Oliva  <aoliva@redhat.com>
  > 
  > 	* lcm.c (optimize_mode_switching): Check whether an insn is a NOTE
  > 	before taking its NOTE_LINE_NUMBER.
Is it even valid for a note to be in ptr->insn_ptr?!?  

According to the documentation for that structure insn_ptr should be
an executable insn, notes aren't executable :-)

So before approving this I'd like a little analysis on how we get a note
into ptr->insn_ptr.

jeff


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