https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114715
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |14.0 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- commit 9d573f71e80e9f6f4aac912fc8fc128aa2697e3a (origin/master, origin/HEAD) Author: Richard Biener <rguent...@suse.de> 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.