lcm assumes an insn is a note without testing
Jeffrey A Law
law@redhat.com
Wed Nov 29 21:40:00 GMT 2000
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
More information about the Gcc-patches
mailing list