From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C9B63858D34; Mon, 15 Apr 2024 11:45:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C9B63858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713181537; bh=UiYTWjUO+XpC81b/tSj93On5rCmLkX1QT0a+kWknCy8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KGcwZafRQkVW2Y5vSuliMT2qL6Tkc9ejxClC4VDHzjfcixD0AZQdWYUgtRDBZiOyX ejOt2Qdo1BM8J8cA8z+tVkk1p7DdsjO5lAFuhZK5sOB+epNJi8SueF809GWCK1DsfO 6Rt7OBJuXGZitZ8FwiGnFD5xH8wVsjnkW7ylYyyo= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/114715] Gcov allocates branches to wrong row for nested switches Date: Mon, 15 Apr 2024 11:45:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 11.4.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_work 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=3D114715 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |14.0 --- Comment #4 from Richard Biener --- commit 9d573f71e80e9f6f4aac912fc8fc128aa2697e3a (origin/master, origin/HEAD) Author: Richard Biener Date: Mon Apr 15 11:09:17 2024 +0200 gcov-profile/114715 - missing coverage for switch The following avoids missing coverage for the line of a switch statement which happens when gimplification emits a BIND_EXPR wrapping the switch as that prevents us from setting locations on the containing statements via annotate_all_with_location. Instead set the location of the GIMPLE switch directly. PR gcov-profile/114715 * gimplify.cc (gimplify_switch_expr): Set the location of the GIMPLE switch. * gcc.misc-tests/gcov-24.c: New testcase.=