I'm testing inlined function support for GCC. When I compile the attached testcase with GCC (Debian's 4.3 package or unmodified trunk) and -g -O2, "break main" in the patched GDB puts a breakpoint at the start of main and again inside the inlined copy of factorial.
This happens because there are several bits of code associated with the line containing main's opening brace. The bad line numbers are introduced by pass_scev_cprop (why is this dumped into "sccp"; having a dump named sccp shortly after one named store_ccp is confusing). Here's the relevant piece of the diff between 096t.lim and 099t.sccp: @@ -88,7 +100,11 @@ <bb 8>: # mult_acc.12_13 = PHI <mult_acc.12_15(6)> - # value_16 = PHI <value_14(6)> + [../break.c : 13] D.2700_29 = value_11 + -1; + [../break.c : 13] D.2701_7 = (unsigned int) D.2633_10; + [../break.c : 13] D.2702_30 = 2 - D.2701_7; + [../break.c : 13] D.2703_31 = (int) D.2702_30; + value_16 = D.2700_29 + D.2703_31; <bb 9>: # mult_acc.12_19 = PHI <mult_acc.12_13(8), 1(4)> There are no other lines associated with break.c:13 in the dump at this point. The location came from internal_get_tmp_var. 644 if (EXPR_HAS_LOCATION (val)) 645 SET_EXPR_LOCUS (mod, EXPR_LOCUS (val)); 646 else 647 SET_EXPR_LOCATION (mod, input_location); input_location has nothing to do with anything at this point. -- Summary: scev const-prop pass adds bad line numbers Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: drow at gcc dot gnu dot org GCC host triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36748