From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 762863858406; Mon, 10 Oct 2022 08:29:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 762863858406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665390582; bh=/zstlELOn+hWuO+Mqzs/2Yqmw8yH7MY48VOqrcbkf40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=amGnGTRrV6EBlOUwSItGysztT5P1La8Z5/JfZHK3ZeQHis5HIPF4feG9F/yAvgBOW rK80PRx9Yplb6Q6djz3YQOs7ecLFJkUqRcUiE6uHzNUkGFH44nJWZu3bBH/OLBOK0q 6MV0MeGMxYLvfrk4uZ/ITepsi9TmNvaujKpUPXEs= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/107193] [13 regression] bootstrap error caused by r13-3172-gf30e9fd33e56a5 Date: Mon, 10 Oct 2022 08:29:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build, GC, ice-on-valid-code X-Bugzilla-Severity: blocker X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107193 --- Comment #3 from Hongtao.liu --- 1212 /* Traverse the basic block, if two function calls within a basic block 1213 are mapped to the same line, assign a new discriminator becaus= e a call 1214 stmt could be a split point of a basic block. */ 1215 for (gsi =3D gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi= )) 1216 { 1217 gimple *stmt =3D gsi_stmt (gsi); 1218 expanded_location curr_locus_e; Shouldn't curr_locus_e be defined outside of the loop? orelse, the second iteration, it will be uninitialized and pased to same_line_p=EF=BC=9F 1219 if (curr_locus =3D=3D UNKNOWN_LOCATION) 1220 { 1221 curr_locus =3D gimple_location (stmt); 1222 curr_locus_e =3D expand_location (curr_locus); 1223 } 1224 else if (!same_line_p (curr_locus, &curr_locus_e, gimple_location (stmt))) 1225 { 1226 curr_locus =3D gimple_location (stmt); 1227 curr_locus_e =3D expand_location (curr_locus); 1228 curr_discr =3D 0; 1229 } 1230 else if (curr_discr !=3D 0) 1231 { 1232 location_t loc =3D gimple_location (stmt); 1233 location_t dloc =3D location_with_discriminator (loc, curr_discr); 1234 gimple_set_location (stmt, dloc); 1235 } 1236 /* Allocate a new discriminator for CALL stmt. */ 1237 if (gimple_code (stmt) =3D=3D GIMPLE_CALL) 1238 curr_discr =3D next_discriminator_for_locus (curr_locus); 1239 }=