This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: on removal of line number notes at the end of BBs
- From: Ian Lance Taylor <iant at google dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: jh at suse dot cz, gcc at gcc dot gnu dot org
- Date: 11 Oct 2006 08:34:34 -0700
- Subject: Re: on removal of line number notes at the end of BBs
- References: <orfydv47gi.fsf@free.oliva.athome.lsd.ic.unicamp.br>
Alexandre Oliva <aoliva@redhat.com> writes:
> The patch at http://gcc.gnu.org/ml/gcc-patches/2001-07/msg00399.html
> added code to remove line number notes from the end of basic blocks
> after say turning a jump at the end of a basic block into a
> fallthrough edge.
>
> This unfortunately causes line number info from becoming incorrect for
> test programs such as:
>
> int x;
> int f() {
> x = 0;
> while(1);
> }
>
> We get line number notes for code only up to "x = 0;".
I assume this is only a problem when not optimizing.
Without looking at the code, the problem looks quite similar to one I
fixed here:
2005-07-18 Ian Lance Taylor <ian@airs.com>
PR middle-end/22057
* tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder
blocks when optimizing.
Ian