This is the mail archive of the gcc@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: on removal of line number notes at the end of BBs


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


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