This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: lcm assumes an insn is a note without testing
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: lcm assumes an insn is a note without testing
- From: Jeffrey A Law <law at redhat dot com>
- Date: Wed, 29 Nov 2000 22:42:07 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
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