From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2303C3886C54; Fri, 28 May 2021 11:04:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2303C3886C54 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/100788] Internal compiler error related to #line macros(?) Date: Fri, 28 May 2021 11:04:06 +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.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 11:04:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100788 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |ASSIGNED Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot g= nu.org --- Comment #10 from Martin Li=C5=A1ka --- Thanks. I was able to reproduce that. It's related to the usage of '#line X= YZ' directives which generate a situation where the function ends before it beg= ins. I was able to reduce that to something like: $ cat x.c void foo() { #line 1 } $ gcc --coverage x.c during IPA pass: profile x.c: In function =E2=80=98foo=E2=80=99: x.c:1:1: internal compiler error: in coverage_begin_function, at coverage.c= :662 1 | void | ^ 0xa3168b coverage_begin_function(unsigned int, unsigned int) /home/marxin/Programming/gcc/gcc/coverage.c:662 0xde935f branch_prob(bool) /home/marxin/Programming/gcc/gcc/profile.c:1328 0xf7bd60 tree_profiling /home/marxin/Programming/gcc/gcc/tree-profile.c:782 0xf7bd60 execute /home/marxin/Programming/gcc/gcc/tree-profile.c:888 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. We should not ICE, but rather a warning should be emitted.=