public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info
@ 2004-02-02  9:23 mec dot gnu at mindspring dot com
  2004-02-02  9:24 ` [Bug debug/13974] " mec dot gnu at mindspring dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-02-02  9:23 UTC (permalink / raw)
  To: gcc-bugs

A line marker moved to a bad place in the instruction stream (or, relatively, an
instruction moved to a bad place with respect to the line numbers).  This is a
regression from gcc 3.3.2 to gcc gcc-3_4-branch / gcc HEAD.

The test program is:

  void foo ()
  {
    ;
  }

  int main ()
  {
    int a = 1;
    foo ();
    a += 2;
    return 0;
  }

My compile command is "gcc -gdwarf-2 -S".

With gcc 3.3.2, the output is:

        .loc 1 8 0
  .LBB2:
        movl    $1, -4(%ebp)
        .loc 1 9 0
        call    foo
        .loc 1 10 0
        leal    -4(%ebp), %eax
        addl    $2, (%eax)

With gcc HEAD, the output is:

        .loc 1 8 0
        movl    $1, -4(%ebp)
        .loc 1 9 0
        call    foo
        leal    -4(%ebp), %eax
        .loc 1 10 0
        addl    $2, (%eax)

The leal instruction has migrated before the ".loc 1 10 0" location marker.

If the user executes "jump 10" in gdb, then the gcc HEAD version will fail.
Like this:

  gdb a.out
  (gdb) break 9
  (gdb) break 11
  (gdb) run
  (gdb) jump 10
  (gdb) print a

The "jump 10" will fail with gcc HEAD because the "leal" instruction is in the
wrong place with respect to the start of line number 10.

This happens with both dwarf-2 and stabs+.

This may seem contrived, but the gcc documentation does say:

  Without `-O', the compiler's goal is to reduce the cost of
  compilation and to make debugging produce the expected results.
  Statements are independent: if you stop the program with a
  breakpoint between statements, you can then assign a new value to
  any variable or change the program counter to any other statement
  in the function and get exactly the results you would expect from
  the source code.

I narrowed the problem down to this patch:

  http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00430.html

This is a regression from gcc 3.3.2 so I'm marking it P1.

-- 
           Summary: [3.4/3.5 regression] bad line marker in debug info
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mec dot gnu at mindspring dot com
                CC: gcc-bugs at gcc dot gnu dot org,hubicka at ucw dot cz
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
@ 2004-02-02  9:24 ` mec dot gnu at mindspring dot com
  2004-02-02  9:24 ` mec dot gnu at mindspring dot com
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-02-02  9:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-02-02 09:24 -------
Created an attachment (id=5643)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5643&action=view)
Good assembly code, gcc 3.3.2


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
  2004-02-02  9:24 ` [Bug debug/13974] " mec dot gnu at mindspring dot com
@ 2004-02-02  9:24 ` mec dot gnu at mindspring dot com
  2004-02-02  9:25 ` mec dot gnu at mindspring dot com
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-02-02  9:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-02-02 09:24 -------
Created an attachment (id=5642)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5642&action=view)
Source file, compile with "gcc -gdwarf-2 -S"


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
  2004-02-02  9:24 ` [Bug debug/13974] " mec dot gnu at mindspring dot com
  2004-02-02  9:24 ` mec dot gnu at mindspring dot com
@ 2004-02-02  9:25 ` mec dot gnu at mindspring dot com
  2004-02-02  9:28 ` pinskia at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-02-02  9:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-02-02 09:25 -------
Created an attachment (id=5644)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5644&action=view)
Bad assembly file, gcc HEAD


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (2 preceding siblings ...)
  2004-02-02  9:25 ` mec dot gnu at mindspring dot com
@ 2004-02-02  9:28 ` pinskia at gcc dot gnu dot org
  2004-02-03  5:35 ` drow at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02  9:28 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-debug
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.2
   Target Milestone|---                         |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (3 preceding siblings ...)
  2004-02-02  9:28 ` pinskia at gcc dot gnu dot org
@ 2004-02-03  5:35 ` drow at gcc dot gnu dot org
  2004-02-03  8:27 ` pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-02-03  5:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From drow at gcc dot gnu dot org  2004-02-03 05:35 -------
Jan's patch changed the default line for inserted statements from "the 
statement they are inserted anchored to" to "free-floating in that
vicinity".  I fixed a bunch of these recently.  Jan, I'd like to ask 
again your opinion in changing the default back.  Otherwise we're
going to be finding these for years.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (4 preceding siblings ...)
  2004-02-03  5:35 ` drow at gcc dot gnu dot org
@ 2004-02-03  8:27 ` pinskia at gcc dot gnu dot org
  2004-03-01  1:52 ` mmitchel at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-03  8:27 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-03 08:27:41
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (5 preceding siblings ...)
  2004-02-03  8:27 ` pinskia at gcc dot gnu dot org
@ 2004-03-01  1:52 ` mmitchel at gcc dot gnu dot org
  2004-03-11  5:07 ` mmitchel at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01  1:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 01:52 -------
Jan, I agree with Dan that this problem is serious.

What progress are you making on this problem?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (6 preceding siblings ...)
  2004-03-01  1:52 ` mmitchel at gcc dot gnu dot org
@ 2004-03-11  5:07 ` mmitchel at gcc dot gnu dot org
  2004-03-11 17:49 ` jh at suse dot cz
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-11  5:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-11 05:07 -------
Jan, please let me know what is going on with this bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jh at suse dot cz


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (7 preceding siblings ...)
  2004-03-11  5:07 ` mmitchel at gcc dot gnu dot org
@ 2004-03-11 17:49 ` jh at suse dot cz
  2004-03-13 22:10 ` jh at suse dot cz
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jh at suse dot cz @ 2004-03-11 17:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jh at suse dot cz  2004-03-11 17:49 -------
Subject: Re:  [3.4/3.5 regression] bad line marker in debug info

> 
> ------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 01:52 -------
> Jan, I agree with Dan that this problem is serious.
> 
> What progress are you making on this problem?

I am just looking into it.  Sorry for long delay, I was too busy by
non-gcc work, but I will look into 3.4 issues now.

Honza
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (8 preceding siblings ...)
  2004-03-11 17:49 ` jh at suse dot cz
@ 2004-03-13 22:10 ` jh at suse dot cz
  2004-03-14  1:29 ` drow at false dot org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jh at suse dot cz @ 2004-03-13 22:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jh at suse dot cz  2004-03-13 22:09 -------
Subject: Re:  [3.4/3.5 regression] bad line marker in debug info

> 
> ------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-11 05:07 -------
> Jan, please let me know what is going on with this bug.

Hi,
I still tend to think in favour of explicitly setting locators for places where
we know we are splitting single instruction into multiple ones in some way.  It
seems to me that in most cases optimizers insert new instructions that are not
explicitly attached to statements assigned to surrounding instrucitons.
however I am not thrilled about it and the other way around may work well in
most cases.

The attached patch fix the testcase by similar way as we fixed reload
previously.  The other way is to make emit_insn_after behave as
emit_insn_after_sameloc but I think it is more intrussive.  Sorry for taking my
time.  The patch has failed for misterous reasons and it took me a while to
realize that it is the side effect of macro argument being evaulated multiple
times, so I also moved everything offline.

Bootstrapped/regtested ppc-linux.  Ok for mainline/branch 

2004-03-13  Jan Hubicka  <jh@suse.cz>
	* emit-rtl.c (emit_insn_after_sameloc, emit_jump_insn_after_sameloc,
	emit_call_insn_after_sameloc, emit_insn_before_sameloc): New functions.
	* function.c (fixup_var_refs_insn): Set locators correctly.
	(fixup_var_refs_1): Likewise.
	(fixup_memory_subreg): Likewise.
	(fixup_stack_1): Likewise.
	(optimize-bit_filed): Likewise.
	(purge_addressof_1): Likewise.
	* emit-rtl.c (emit_insn_after_sameloc, emit_jump_insn_after_sameloc,
	emit_call_insn_after_sameloc, emit_insn_before_sameloc): Turn into
	function.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.383
diff -c -3 -p -r1.383 emit-rtl.c
*** emit-rtl.c	6 Mar 2004 01:21:26 -0000	1.383
--- emit-rtl.c	13 Mar 2004 15:44:26 -0000
*************** emit_insn_after_setloc (rtx pattern, rtx
*** 4363,4368 ****
--- 4363,4378 ----
    return last;
  }
  
+ /* Like emit_insn_after, but set INSN_LOCATOR according to INSN.  */
+ rtx
+ emit_insn_after_sameloc (rtx pattern, rtx after)
+ {
+   if (INSN_P (after))
+     return emit_insn_after_setloc (pattern, after, INSN_LOCATOR (after));
+   else
+     return emit_insn_after (pattern, after);
+ }
+ 
  /* Like emit_jump_insn_after, but set INSN_LOCATOR according to SCOPE.  */
  rtx
  emit_jump_insn_after_setloc (rtx pattern, rtx after, int loc)
*************** emit_jump_insn_after_setloc (rtx pattern
*** 4384,4389 ****
--- 4394,4409 ----
    return last;
  }
  
+ /* Like emit_jump_insn_after, but set INSN_LOCATOR according to INSN.  */
+ rtx
+ emit_jump_insn_after_sameloc (rtx pattern, rtx after)
+ {
+   if (INSN_P (after))
+     return emit_jump_insn_after_setloc (pattern, after, INSN_LOCATOR (after));
+   else
+     return emit_jump_insn_after (pattern, after);
+ }
+ 
  /* Like emit_call_insn_after, but set INSN_LOCATOR according to SCOPE.  */
  rtx
  emit_call_insn_after_setloc (rtx pattern, rtx after, int loc)
*************** emit_call_insn_after_setloc (rtx pattern
*** 4405,4410 ****
--- 4425,4440 ----
    return last;
  }
  
+ /* Like emit_call_insn_after, but set INSN_LOCATOR according to INSN.  */
+ rtx
+ emit_call_insn_after_sameloc (rtx pattern, rtx after)
+ {
+   if (INSN_P (after))
+     return emit_call_insn_after_setloc (pattern, after, INSN_LOCATOR (after));
+   else
+     return emit_call_insn_after (pattern, after);
+ }
+ 
  /* Like emit_insn_before, but set INSN_LOCATOR according to SCOPE.  */
  rtx
  emit_insn_before_setloc (rtx pattern, rtx before, int loc)
*************** emit_insn_before_setloc (rtx pattern, rt
*** 4425,4430 ****
--- 4455,4470 ----
        first = NEXT_INSN (first);
      }
    return last;
+ }
+ 
+ /* Like emit_insn_before, but set INSN_LOCATOR according to INSN.  */
+ rtx
+ emit_insn_before_sameloc (rtx pattern, rtx before)
+ {
+   if (INSN_P (before))
+     return emit_insn_before_setloc (pattern, before, INSN_LOCATOR (before));
+   else
+     return emit_insn_before (pattern, before);
  }
  \f
  /* Take X and emit it at the end of the doubly-linked
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.504
diff -c -3 -p -r1.504 function.c
*** function.c	12 Mar 2004 10:03:27 -0000	1.504
--- function.c	13 Mar 2004 15:44:27 -0000
*************** fixup_var_refs_insn (rtx insn, rtx var, 
*** 1735,1741 ****
  	    {
  	      rtx temp = gen_reg_rtx (GET_MODE (call_dest));
  
! 	      emit_insn_before (gen_move_insn (temp, call_dest), insn);
  
  	      PATTERN (insn) = replace_rtx (PATTERN (insn),
  					    call_dest, temp);
--- 1735,1741 ----
  	    {
  	      rtx temp = gen_reg_rtx (GET_MODE (call_dest));
  
! 	      emit_insn_before_sameloc (gen_move_insn (temp, call_dest), insn);
  
  	      PATTERN (insn) = replace_rtx (PATTERN (insn),
  					    call_dest, temp);
*************** fixup_var_refs_insn (rtx insn, rtx var, 
*** 1809,1815 ****
  		seq = gen_move_insn (replacements->new,
  				     replacements->old);
  
! 	      emit_insn_before (seq, insert_before);
  	    }
  
  	  next = replacements->next;
--- 1809,1815 ----
  		seq = gen_move_insn (replacements->new,
  				     replacements->old);
  
! 	      emit_insn_before_sameloc (seq, insert_before);
  	    }
  
  	  next = replacements->next;
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 1900,1906 ****
  		insn = PREV_INSN (insn);
  #endif
  
! 	      emit_insn_before (seq, insn);
  	    }
  	}
        return;
--- 1900,1906 ----
  		insn = PREV_INSN (insn);
  #endif
  
! 	      emit_insn_before_sameloc (seq, insn);
  	    }
  	}
        return;
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2061,2067 ****
  	     reference.  Copy the input into a register.  */
  
  	  tem1 = gen_reg_rtx (GET_MODE (tem));
! 	  emit_insn_before (gen_move_insn (tem1, tem), insn);
  	  XEXP (x, 0) = tem1;
  	  return;
  	}
--- 2061,2067 ----
  	     reference.  Copy the input into a register.  */
  
  	  tem1 = gen_reg_rtx (GET_MODE (tem));
! 	  emit_insn_before_sameloc (gen_move_insn (tem1, tem), insn);
  	  XEXP (x, 0) = tem1;
  	  return;
  	}
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2157,2163 ****
  	    replacement->new = gen_reg_rtx (GET_MODE (var));
  
  	  SUBREG_REG (XEXP (SET_DEST (x), 0)) = replacement->new;
! 	  emit_insn_after (gen_move_insn (var, replacement->new), insn);
  	}
  
        /* If SET_DEST is now a paradoxical SUBREG, put the result of this
--- 2157,2163 ----
  	    replacement->new = gen_reg_rtx (GET_MODE (var));
  
  	  SUBREG_REG (XEXP (SET_DEST (x), 0)) = replacement->new;
! 	  emit_insn_after_sameloc (gen_move_insn (var, replacement->new), insn);
  	}
  
        /* If SET_DEST is now a paradoxical SUBREG, put the result of this
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2168,2176 ****
  	      > GET_MODE_SIZE (GET_MODE (var))))
  	{
  	  SET_DEST (x) = tem = gen_reg_rtx (GET_MODE (SET_DEST (x)));
! 	  emit_insn_after (gen_move_insn (var, gen_lowpart (GET_MODE (var),
! 							    tem)),
! 			   insn);
  	  break;
  	}
  
--- 2168,2176 ----
  	      > GET_MODE_SIZE (GET_MODE (var))))
  	{
  	  SET_DEST (x) = tem = gen_reg_rtx (GET_MODE (SET_DEST (x)));
! 	  emit_insn_after_sameloc (gen_move_insn (var, gen_lowpart (GET_MODE (var),
! 							           tem)),
! 				   insn);
  	  break;
  	}
  
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2264,2271 ****
  	       a register, do the store, and put it back into memory.  */
  
  	    tem1 = gen_reg_rtx (GET_MODE (tem));
! 	    emit_insn_before (gen_move_insn (tem1, tem), insn);
! 	    emit_insn_after (gen_move_insn (tem, tem1), insn);
  	    XEXP (outerdest, 0) = tem1;
  	    return;
  	  }
--- 2264,2271 ----
  	       a register, do the store, and put it back into memory.  */
  
  	    tem1 = gen_reg_rtx (GET_MODE (tem));
! 	    emit_insn_before_sameloc (gen_move_insn (tem1, tem), insn);
! 	    emit_insn_after_sameloc (gen_move_insn (tem, tem1), insn);
  	    XEXP (outerdest, 0) = tem1;
  	    return;
  	  }
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2338,2344 ****
  	    pat = gen_move_insn (SET_DEST (x), SET_SRC (x));
  	    if (NEXT_INSN (pat) != NULL_RTX)
  	      {
! 		last = emit_insn_before (pat, insn);
  
  		/* INSN might have REG_RETVAL or other important notes, so
  		   we need to store the pattern of the last insn in the
--- 2338,2344 ----
  	    pat = gen_move_insn (SET_DEST (x), SET_SRC (x));
  	    if (NEXT_INSN (pat) != NULL_RTX)
  	      {
! 		last = emit_insn_before_sameloc (pat, insn);
  
  		/* INSN might have REG_RETVAL or other important notes, so
  		   we need to store the pattern of the last insn in the
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2382,2388 ****
  	    pat = gen_move_insn (SET_DEST (x), SET_SRC (x));
  	    if (NEXT_INSN (pat) != NULL_RTX)
  	      {
! 		last = emit_insn_before (pat, insn);
  
  		/* INSN might have REG_RETVAL or other important notes, so
  		   we need to store the pattern of the last insn in the
--- 2382,2388 ----
  	    pat = gen_move_insn (SET_DEST (x), SET_SRC (x));
  	    if (NEXT_INSN (pat) != NULL_RTX)
  	      {
! 		last = emit_insn_before_sameloc (pat, insn);
  
  		/* INSN might have REG_RETVAL or other important notes, so
  		   we need to store the pattern of the last insn in the
*************** fixup_var_refs_1 (rtx var, enum machine_
*** 2437,2446 ****
  
  	    temp = gen_reg_rtx (temp_mode);
  
! 	    emit_insn_after (gen_move_insn (fixeddest,
! 					    gen_lowpart (GET_MODE (fixeddest),
! 							 temp)),
! 			     insn);
  
  	    SET_DEST (x) = temp;
  	  }
--- 2437,2446 ----
  
  	    temp = gen_reg_rtx (temp_mode);
  
! 	    emit_insn_after_sameloc
! 		   (gen_move_insn (fixeddest, gen_lowpart (GET_MODE (fixeddest),
! 							   temp)),
! 		    insn);
  
  	    SET_DEST (x) = temp;
  	  }
*************** fixup_memory_subreg (rtx x, rtx insn, en
*** 2508,2514 ****
    seq = get_insns ();
    end_sequence ();
  
!   emit_insn_before (seq, insn);
    return result;
  }
  
--- 2508,2514 ----
    seq = get_insns ();
    end_sequence ();
  
!   emit_insn_before_sameloc (seq, insn);
    return result;
  }
  
*************** fixup_stack_1 (rtx x, rtx insn)
*** 2595,2601 ****
  	  temp = copy_to_reg (ad);
  	  seq = get_insns ();
  	  end_sequence ();
! 	  emit_insn_before (seq, insn);
  	  return replace_equiv_address (x, temp);
  	}
        return x;
--- 2595,2601 ----
  	  temp = copy_to_reg (ad);
  	  seq = get_insns ();
  	  end_sequence ();
! 	  emit_insn_before_sameloc (seq, insn);
  	  return replace_equiv_address (x, temp);
  	}
        return x;
*************** optimize_bit_field (rtx body, rtx insn, 
*** 2701,2707 ****
  	  memref = adjust_address (memref, mode, offset);
  	  insns = get_insns ();
  	  end_sequence ();
! 	  emit_insn_before (insns, insn);
  
  	  /* Store this memory reference where
  	     we found the bit field reference.  */
--- 2701,2707 ----
  	  memref = adjust_address (memref, mode, offset);
  	  insns = get_insns ();
  	  end_sequence ();
! 	  emit_insn_before_sameloc (insns, insn);
  
  	  /* Store this memory reference where
  	     we found the bit field reference.  */
*************** optimize_bit_field (rtx body, rtx insn, 
*** 2769,2775 ****
  	     special; just let the optimization be suppressed.  */
  
  	  if (apply_change_group () && seq)
! 	    emit_insn_before (seq, insn);
  	}
      }
  }
--- 2769,2775 ----
  	     special; just let the optimization be suppressed.  */
  
  	  if (apply_change_group () && seq)
! 	    emit_insn_before_sameloc (seq, insn);
  	}
      }
  }
*************** purge_addressof_1 (rtx *loc, rtx insn, i
*** 3023,3029 ****
  
        insns = get_insns ();
        end_sequence ();
!       emit_insn_before (insns, insn);
        return true;
      }
  
--- 3023,3029 ----
  
        insns = get_insns ();
        end_sequence ();
!       emit_insn_before_sameloc (insns, insn);
        return true;
      }
  
*************** purge_addressof_1 (rtx *loc, rtx insn, i
*** 3178,3184 ****
  		    }
  		  seq = get_insns ();
  		  end_sequence ();
! 		  emit_insn_before (seq, insn);
  		  compute_insns_for_mem (p ? NEXT_INSN (p) : get_insns (),
  					 insn, ht);
  
--- 3178,3184 ----
  		    }
  		  seq = get_insns ();
  		  end_sequence ();
! 		  emit_insn_before_sameloc (seq, insn);
  		  compute_insns_for_mem (p ? NEXT_INSN (p) : get_insns (),
  					 insn, ht);
  
*************** purge_addressof_1 (rtx *loc, rtx insn, i
*** 3192,3198 ****
  
  		  seq = get_insns ();
  		  end_sequence ();
! 		  p = emit_insn_after (seq, insn);
  		  if (NEXT_INSN (insn))
  		    compute_insns_for_mem (NEXT_INSN (insn),
  					   p ? NEXT_INSN (p) : NULL_RTX,
--- 3192,3198 ----
  
  		  seq = get_insns ();
  		  end_sequence ();
! 		  p = emit_insn_after_sameloc (seq, insn);
  		  if (NEXT_INSN (insn))
  		    compute_insns_for_mem (NEXT_INSN (insn),
  					   p ? NEXT_INSN (p) : NULL_RTX,
*************** purge_addressof_1 (rtx *loc, rtx insn, i
*** 3217,3223 ****
  
  		  seq = get_insns ();
  		  end_sequence ();
! 		  emit_insn_before (seq, insn);
  		  compute_insns_for_mem (p ? NEXT_INSN (p) : get_insns (),
  					 insn, ht);
  		}
--- 3217,3223 ----
  
  		  seq = get_insns ();
  		  end_sequence ();
! 		  emit_insn_before_sameloc (seq, insn);
  		  compute_insns_for_mem (p ? NEXT_INSN (p) : get_insns (),
  					 insn, ht);
  		}
*************** instantiate_virtual_regs_1 (rtx *loc, rt
*** 3839,3845 ****
  	  seq = get_insns ();
  	  end_sequence ();
  
! 	  emit_insn_before (seq, object);
  	  SET_DEST (x) = new;
  
  	  if (! validate_change (object, &SET_SRC (x), temp, 0)
--- 3839,3845 ----
  	  seq = get_insns ();
  	  end_sequence ();
  
! 	  emit_insn_before_sameloc (seq, object);
  	  SET_DEST (x) = new;
  
  	  if (! validate_change (object, &SET_SRC (x), temp, 0)
*************** instantiate_virtual_regs_1 (rtx *loc, rt
*** 3937,3943 ****
  	      temp = gen_reg_rtx (Pmode);
  	      XEXP (x, 0) = new;
  	      if (validate_change (object, &XEXP (x, 1), temp, 0))
! 		emit_insn_before (gen_move_insn (temp, new_offset), object);
  	      else
  		{
  		  /* If that didn't work, replace this expression with a
--- 3937,3943 ----
  	      temp = gen_reg_rtx (Pmode);
  	      XEXP (x, 0) = new;
  	      if (validate_change (object, &XEXP (x, 1), temp, 0))
! 		emit_insn_before_sameloc (gen_move_insn (temp, new_offset), object);
  	      else
  		{
  		  /* If that didn't work, replace this expression with a
*************** instantiate_virtual_regs_1 (rtx *loc, rt
*** 3951,3957 ****
  		  seq = get_insns ();
  		  end_sequence ();
  
! 		  emit_insn_before (seq, object);
  		  if (! validate_change (object, loc, temp, 0)
  		      && ! validate_replace_rtx (x, temp, object))
  		    {
--- 3951,3957 ----
  		  seq = get_insns ();
  		  end_sequence ();
  
! 		  emit_insn_before_sameloc (seq, object);
  		  if (! validate_change (object, loc, temp, 0)
  		      && ! validate_replace_rtx (x, temp, object))
  		    {
*************** instantiate_virtual_regs_1 (rtx *loc, rt
*** 4110,4116 ****
  	      seq = get_insns ();
  	      end_sequence ();
  
! 	      emit_insn_before (seq, object);
  	      if (! validate_change (object, loc, temp, 0)
  		  && ! validate_replace_rtx (x, temp, object))
  	        instantiate_virtual_regs_lossage (object);
--- 4110,4116 ----
  	      seq = get_insns ();
  	      end_sequence ();
  
! 	      emit_insn_before_sameloc (seq, object);
  	      if (! validate_change (object, loc, temp, 0)
  		  && ! validate_replace_rtx (x, temp, object))
  	        instantiate_virtual_regs_lossage (object);
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.465
diff -c -3 -p -r1.465 rtl.h
*** rtl.h	9 Mar 2004 17:06:21 -0000	1.465
--- rtl.h	13 Mar 2004 15:44:27 -0000
*************** extern rtx assign_temp (tree, int, int, 
*** 1653,1671 ****
--- 1653,1677 ----
  /* In emit-rtl.c */
  extern rtx emit_insn_before (rtx, rtx);
  extern rtx emit_insn_before_setloc (rtx, rtx, int);
+ extern rtx emit_insn_before_sameloc (rtx, rtx);
  extern rtx emit_jump_insn_before (rtx, rtx);
  extern rtx emit_jump_insn_before_setloc (rtx, rtx, int);
+ extern rtx emit_jump_insn_before_sameloc (rtx, rtx);
  extern rtx emit_call_insn_before (rtx, rtx);
  extern rtx emit_call_insn_before_setloc (rtx, rtx, int);
+ extern rtx emit_call_insn_before_sameloc (rtx, rtx);
  extern rtx emit_barrier_before (rtx);
  extern rtx emit_label_before (rtx, rtx);
  extern rtx emit_note_before (int, rtx);
  extern rtx emit_insn_after (rtx, rtx);
  extern rtx emit_insn_after_setloc (rtx, rtx, int);
+ extern rtx emit_insn_after_sameloc (rtx, rtx);
  extern rtx emit_jump_insn_after (rtx, rtx);
  extern rtx emit_jump_insn_after_setloc (rtx, rtx, int);
+ extern rtx emit_jump_insn_after_sameloc (rtx, rtx);
  extern rtx emit_call_insn_after (rtx, rtx);
  extern rtx emit_call_insn_after_setloc (rtx, rtx, int);
+ extern rtx emit_call_insn_after_sameloc (rtx, rtx);
  extern rtx emit_barrier_after (rtx);
  extern rtx emit_label_after (rtx, rtx);
  extern rtx emit_note_after (int, rtx);
*************** extern rtx prev_label (rtx);
*** 1694,1712 ****
  extern rtx next_label (rtx);
  extern rtx next_cc0_user (rtx);
  extern rtx prev_cc0_setter (rtx);
- 
- #define emit_insn_before_sameloc(INSN, BEFORE) \
-   emit_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE))
- #define emit_jump_insn_before_sameloc(INSN, BEFORE) \
-   emit_jump_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE))
- #define emit_call_insn_before_sameloc(INSN, BEFORE) \
-   emit_call_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE))
- #define emit_insn_after_sameloc(INSN, AFTER) \
-   emit_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER))
- #define emit_jump_insn_after_sameloc(INSN, AFTER) \
-   emit_jump_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER))
- #define emit_call_insn_after_sameloc(INSN, AFTER) \
-   emit_call_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER))
  
  /* In cfglayout.c  */
  extern tree choose_inner_scope (tree, tree);
--- 1700,1705 ----


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (9 preceding siblings ...)
  2004-03-13 22:10 ` jh at suse dot cz
@ 2004-03-14  1:29 ` drow at false dot org
  2004-03-14 10:12 ` jh at suse dot cz
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: drow at false dot org @ 2004-03-14  1:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From drow at false dot org  2004-03-14 01:29 -------
Subject: Re:  [3.4/3.5 regression] bad line marker in debug info

On Sat, Mar 13, 2004 at 11:09:54PM +0100, Jan Hubicka wrote:
> > 
> > ------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-11 05:07 -------
> > Jan, please let me know what is going on with this bug.
> 
> Hi,
> I still tend to think in favour of explicitly setting locators for places where
> we know we are splitting single instruction into multiple ones in some way.  It
> seems to me that in most cases optimizers insert new instructions that are not
> explicitly attached to statements assigned to surrounding instrucitons.
> however I am not thrilled about it and the other way around may work well in
> most cases.
> 
> The attached patch fix the testcase by similar way as we fixed reload
> previously.  The other way is to make emit_insn_after behave as
> emit_insn_after_sameloc but I think it is more intrussive.  Sorry for taking my
> time.  The patch has failed for misterous reasons and it took me a while to
> realize that it is the side effect of macro argument being evaulated multiple
> times, so I also moved everything offline.

Could you explain what you mean by 'more intrusive'?  It'd be a much
smaller patch, for sure.

Personally, I'd rather fix everywhere that emits an instruction, using
some other instruction before or after in the instruction stream as an
anchor, that is _not_ associated with that instruction, to specify so
explicitly.  Do you even have an example of this?



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (10 preceding siblings ...)
  2004-03-14  1:29 ` drow at false dot org
@ 2004-03-14 10:12 ` jh at suse dot cz
  2004-03-14 17:31 ` drow at false dot org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jh at suse dot cz @ 2004-03-14 10:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jh at suse dot cz  2004-03-14 10:12 -------
Subject: Re:  [3.4/3.5 regression] bad line marker in debug info

> On Sat, Mar 13, 2004 at 11:09:54PM +0100, Jan Hubicka wrote:
> > > 
> > > ------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-11 05:07 -------
> > > Jan, please let me know what is going on with this bug.
> > 
> > Hi,
> > I still tend to think in favour of explicitly setting locators for places where
> > we know we are splitting single instruction into multiple ones in some way.  It
> > seems to me that in most cases optimizers insert new instructions that are not
> > explicitly attached to statements assigned to surrounding instrucitons.
> > however I am not thrilled about it and the other way around may work well in
> > most cases.
> > 
> > The attached patch fix the testcase by similar way as we fixed reload
> > previously.  The other way is to make emit_insn_after behave as
> > emit_insn_after_sameloc but I think it is more intrussive.  Sorry for taking my
> > time.  The patch has failed for misterous reasons and it took me a while to
> > realize that it is the side effect of macro argument being evaulated multiple
> > times, so I also moved everything offline.
> 
> Could you explain what you mean by 'more intrusive'?  It'd be a much
> smaller patch, for sure.

It does change the behaviour more than the patch above.
> 
> Personally, I'd rather fix everywhere that emits an instruction, using
> some other instruction before or after in the instruction stream as an
> anchor, that is _not_ associated with that instruction, to specify so
> explicitly.  Do you even have an example of this?

Code motion in loop optimizer, gcse, profiling and similar code emitting
to BB headers/footers and such.  You are quite right that once you
choose particular instruction in the middle of basic block to emit
something around, you usually want to have it associated with that
instruction in local optimizers.

The questional thing is what to do when instrucitons already have
locators set (ie you are doing code motion and such), but if it really
seems to be sane to just flip the API other way around, I can rename the
emit functions *_noloc and update the uses in CFG, loop and friends.

Honza
 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (11 preceding siblings ...)
  2004-03-14 10:12 ` jh at suse dot cz
@ 2004-03-14 17:31 ` drow at false dot org
  2004-03-14 17:42 ` jh at suse dot cz
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: drow at false dot org @ 2004-03-14 17:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From drow at false dot org  2004-03-14 17:31 -------
Subject: Re:  [3.4/3.5 regression] bad line marker in debug info

On Sun, Mar 14, 2004 at 11:12:43AM +0100, Jan Hubicka wrote:
> Code motion in loop optimizer, gcse, profiling and similar code emitting
> to BB headers/footers and such.  You are quite right that once you
> choose particular instruction in the middle of basic block to emit
> something around, you usually want to have it associated with that
> instruction in local optimizers.

Remember what these locators are used for - as far as I know the only
correct use is for debug information and debugging dumps.  So what do
we gain from not giving them a location - not very much.

> The questional thing is what to do when instrucitons already have
> locators set (ie you are doing code motion and such), but if it really
> seems to be sane to just flip the API other way around, I can rename the
> emit functions *_noloc and update the uses in CFG, loop and friends.

Well, that's what I'd like to see.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (12 preceding siblings ...)
  2004-03-14 17:31 ` drow at false dot org
@ 2004-03-14 17:42 ` jh at suse dot cz
  2004-03-25 16:45 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jh at suse dot cz @ 2004-03-14 17:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jh at suse dot cz  2004-03-14 17:42 -------
Subject: Re:  [3.4/3.5 regression] bad line marker in debug info

> 
> ------- Additional Comments From drow at false dot org  2004-03-14 17:31 -------
> Subject: Re:  [3.4/3.5 regression] bad line marker in debug info
> 
> On Sun, Mar 14, 2004 at 11:12:43AM +0100, Jan Hubicka wrote:
> > Code motion in loop optimizer, gcse, profiling and similar code emitting
> > to BB headers/footers and such.  You are quite right that once you
> > choose particular instruction in the middle of basic block to emit
> > something around, you usually want to have it associated with that
> > instruction in local optimizers.
> 
> Remember what these locators are used for - as far as I know the only
> correct use is for debug information and debugging dumps.  So what do
> we gain from not giving them a location - not very much.

We also use them for coveraging.  I did some testing with the idea and
at -O2 it made coverages be more messed up than they are currently (we
invented new disjoint places with same locators while moving the code
not directly attached to the line so we counted lines multiple times),
so at least counting the number of executions of lines did went more
wrong than with current approach.

On the other hand on profiling-branch we do coveraging earlier so we
almost elliminate these effects and both debugging and coverage is
messed up at -O2 on mainline anyway..
> 
> > The questional thing is what to do when instrucitons already have
> > locators set (ie you are doing code motion and such), but if it really
> > seems to be sane to just flip the API other way around, I can rename the
> > emit functions *_noloc and update the uses in CFG, loop and friends.
> 
> Well, that's what I'd like to see.

Hmm, OK, I can find time to do it at monday or tuesday if it looks
acceptable for 3.4 too.

Honza
> 
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.4/3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (13 preceding siblings ...)
  2004-03-14 17:42 ` jh at suse dot cz
@ 2004-03-25 16:45 ` cvs-commit at gcc dot gnu dot org
  2004-03-25 19:31 ` [Bug debug/13974] [3.5 " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-25 16:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-25 16:44 -------
Subject: Bug 13974

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	hubicka@gcc.gnu.org	2004-03-25 16:44:45

Modified files:
	gcc            : ChangeLog cfgrtl.c emit-rtl.c gcse.c reload1.c 
	                 rtl.h 

Log message:
	PR debug/13974
	* cfgrtl.c (try_redirect_by_replacing_jump,
	force_nonfallthru_and_redirect, commit_one_edge_insertion,
	cfg_layout_merge_blocks):  Do not attach any line number information
	to newly inserted instructions.
	* emit-rtl.c (emit_insn*_before, emit_insn*_after): Rename to
	emit_insn_*_noloc.
	(emit_*insn_before, emit_insn*_after): New.
	(emit_*insn_before_setloc, emit_*insn_after_setloc): Do not overwrite
	existing locators.
	* rtl.h (emit_*insn_before_noloc, emit_*insn_after_noloc): Declare.
	(emit_*insn_before_sameloc, emit_*insn_after_sameloc): Kill.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.369&r2=2.2326.2.370
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgrtl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.103.2.2&r2=1.103.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/emit-rtl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.365.4.4&r2=1.365.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcse.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.288.2.3&r2=1.288.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.419.4.2&r2=1.419.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/rtl.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.448.4.3&r2=1.448.4.4



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (14 preceding siblings ...)
  2004-03-25 16:45 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-25 19:31 ` pinskia at gcc dot gnu dot org
  2004-04-04 19:23 ` mec dot gnu at mindspring dot com
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-25 19:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-25 19:31 -------
Fixed in 3.4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/3.5 regression] bad    |[3.5 regression] bad line
                   |line marker in debug info   |marker in debug info
   Target Milestone|3.4.0                       |3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (15 preceding siblings ...)
  2004-03-25 19:31 ` [Bug debug/13974] [3.5 " pinskia at gcc dot gnu dot org
@ 2004-04-04 19:23 ` mec dot gnu at mindspring dot com
  2004-08-27 14:47 ` giovannibajo at libero dot it
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-04-04 19:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-04-04 19:23 -------
gcc gcc-3_4-branch 20040330 works correctly on my test programs.  Good job.
But it is still broken in gcc HEAD 20040330.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [3.5 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (16 preceding siblings ...)
  2004-04-04 19:23 ` mec dot gnu at mindspring dot com
@ 2004-08-27 14:47 ` giovannibajo at libero dot it
  2004-09-22 18:23 ` [Bug debug/13974] [4.0 " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: giovannibajo at libero dot it @ 2004-08-27 14:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-08-27 14:47 -------
Jan, this bug is still actual on HEAD: your patch was committed to the 3_4 
branch only. What is the status on this? Is the patch feasable to be ported to 
HEAD too?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [4.0 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (17 preceding siblings ...)
  2004-08-27 14:47 ` giovannibajo at libero dot it
@ 2004-09-22 18:23 ` pinskia at gcc dot gnu dot org
  2004-09-30 21:26 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-22 18:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-22 18:23 -------
Jan can you retest your patch and then apply it to the mainline, this causes a huge number of 
debugging regressions?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
      Known to fail|3.4.0 4.0                   |3.4.0 4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [4.0 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (18 preceding siblings ...)
  2004-09-22 18:23 ` [Bug debug/13974] [4.0 " pinskia at gcc dot gnu dot org
@ 2004-09-30 21:26 ` cvs-commit at gcc dot gnu dot org
  2004-09-30 21:27 ` hubicka at gcc dot gnu dot org
  2004-10-13 17:15 ` mec dot gnu at mindspring dot com
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-30 21:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-30 21:26 -------
Subject: Bug 13974

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hubicka@gcc.gnu.org	2004-09-30 21:25:53

Modified files:
	gcc            : ChangeLog cfgrtl.c emit-rtl.c gcse.c reload1.c 
	                 rtl.h tree-ssa-pre.c 

Log message:
	PR debug/13974
	* cfgrtl.c (try_redirect_by_replacing_jump,
	force_nonfallthru_and_redirect, commit_one_edge_insertion,
	cfg_layout_merge_blocks):  Do not attach any line number information
	to newly inserted instructions.
	* emit-rtl.c (emit_insn*_before, emit_insn*_after): Rename to
	emit_insn_*_noloc.
	(emit_*insn_before, emit_insn*_after): New.
	(emit_*insn_before_setloc, emit_*insn_after_setloc): Do not overwrite
	existing locators.
	* rtl.h (emit_*insn_before_noloc, emit_*insn_after_noloc): Declare.
	(emit_*insn_before_sameloc, emit_*insn_after_sameloc): Kill.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5699&r2=2.5700
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgrtl.c.diff?cvsroot=gcc&r1=1.135&r2=1.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/emit-rtl.c.diff?cvsroot=gcc&r1=1.417&r2=1.418
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcse.c.diff?cvsroot=gcc&r1=1.318&r2=1.319
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload1.c.diff?cvsroot=gcc&r1=1.448&r2=1.449
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/rtl.h.diff?cvsroot=gcc&r1=1.510&r2=1.511
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&r1=2.44&r2=2.45



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [4.0 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (19 preceding siblings ...)
  2004-09-30 21:26 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-30 21:27 ` hubicka at gcc dot gnu dot org
  2004-10-13 17:15 ` mec dot gnu at mindspring dot com
  21 siblings, 0 replies; 23+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2004-09-30 21:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at gcc dot gnu dot org  2004-09-30 21:27 -------
Finally commited the patch ;)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug debug/13974] [4.0 regression] bad line marker in debug info
  2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
                   ` (20 preceding siblings ...)
  2004-09-30 21:27 ` hubicka at gcc dot gnu dot org
@ 2004-10-13 17:15 ` mec dot gnu at mindspring dot com
  21 siblings, 0 replies; 23+ messages in thread
From: mec dot gnu at mindspring dot com @ 2004-10-13 17:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mec dot gnu at mindspring dot com  2004-10-13 17:15 -------
Subject: Re:  [4.0 regression] bad line marker in debug info

All right!

It works in my gdb test bed, and does not cause any other regressions.

There are still a few gdb test suite regressions from gcc 3.4.2 to gcc HEAD.
I will analyze them and file fresh PR's for them.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13974


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2004-10-13 17:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-02  9:23 [Bug debug/13974] New: [3.4/3.5 regression] bad line marker in debug info mec dot gnu at mindspring dot com
2004-02-02  9:24 ` [Bug debug/13974] " mec dot gnu at mindspring dot com
2004-02-02  9:24 ` mec dot gnu at mindspring dot com
2004-02-02  9:25 ` mec dot gnu at mindspring dot com
2004-02-02  9:28 ` pinskia at gcc dot gnu dot org
2004-02-03  5:35 ` drow at gcc dot gnu dot org
2004-02-03  8:27 ` pinskia at gcc dot gnu dot org
2004-03-01  1:52 ` mmitchel at gcc dot gnu dot org
2004-03-11  5:07 ` mmitchel at gcc dot gnu dot org
2004-03-11 17:49 ` jh at suse dot cz
2004-03-13 22:10 ` jh at suse dot cz
2004-03-14  1:29 ` drow at false dot org
2004-03-14 10:12 ` jh at suse dot cz
2004-03-14 17:31 ` drow at false dot org
2004-03-14 17:42 ` jh at suse dot cz
2004-03-25 16:45 ` cvs-commit at gcc dot gnu dot org
2004-03-25 19:31 ` [Bug debug/13974] [3.5 " pinskia at gcc dot gnu dot org
2004-04-04 19:23 ` mec dot gnu at mindspring dot com
2004-08-27 14:47 ` giovannibajo at libero dot it
2004-09-22 18:23 ` [Bug debug/13974] [4.0 " pinskia at gcc dot gnu dot org
2004-09-30 21:26 ` cvs-commit at gcc dot gnu dot org
2004-09-30 21:27 ` hubicka at gcc dot gnu dot org
2004-10-13 17:15 ` mec dot gnu at mindspring dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).