From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5695 invoked by alias); 7 Jul 2008 13:48:37 -0000 Received: (qmail 5391 invoked by uid 48); 7 Jul 2008 13:47:52 -0000 Date: Mon, 07 Jul 2008 13:48:00 -0000 Subject: [Bug debug/36748] New: scev const-prop pass adds bad line numbers X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "drow at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg00789.txt.bz2 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 @@ : # mult_acc.12_13 = PHI - # value_16 = PHI + [../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; : # mult_acc.12_19 = PHI 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