[Bug gcov-profile/94029] New: gcc crash in coverage.c:655

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Wed Mar 4 10:08:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94029

            Bug ID: 94029
           Summary: gcc crash in coverage.c:655
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

This causes a crash in gcc:

$ cat test.c
#define impl_test(name) void test_##name() { }
impl_test(t1
) impl_test(t2)
$ gcc -ftest-coverage -c test.c
during IPA pass: profile
test.c: In function ‘test_t2’:
test.c:2:1: internal compiler error: in coverage_begin_function, at
coverage.c:655
    2 | impl_test(t1
      | ^~~~~~~~~
0x66ce7f coverage_begin_function(unsigned int, unsigned int)
        ../../gcc-trunk/gcc/coverage.c:655
0xd2cc66 branch_prob(bool)
        ../../gcc-trunk/gcc/profile.c:1307
0xea6687 tree_profiling
        ../../gcc-trunk/gcc/tree-profile.c:779
0xea6687 execute
        ../../gcc-trunk/gcc/tree-profile.c:885
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


(this was reduced from openssl-1.1.1d where this also happens,
when configured with -ftest-coverage)


More information about the Gcc-bugs mailing list