0

Using EDG frontend compiler to generate CPP code started to crash on GCC 9/10/11, used to work on GCC 6.3.0.

   during IPA pass: profile
<file_name>.m4: In function 'void <function_name>(int)':
<file_name>.m4:4232:1: internal compiler error: in coverage_begin_function, at coverage.c:656
0x59a1fa coverage_begin_function(unsigned int, unsigned int)
                /tmp/gcc-v9.3.0p3/gcc.source/gcc/coverage.c:458
0xad549a branch_prob(bool)
    /tmp/gcc-v9.3.0p3/gcc.source/gcc/profile.c:1233
0xc10212 tree_profiling
    /tmp/gcc-v9.3.0p3/gcc.source/gcc/tree-profile.c:793
0xc10212 execute
/tmp/gcc-v9.3.0p3/gcc.source/gcc/tree-profile.c:898
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.

Any help will be appreciated.

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82

1 Answers1

0

This issue was solved on Bugzilla Bug 100788

Threre is an issue on the GCC processor which crashes when it tries to process the#line directives during coverage compilation.

Solution: backport a patch from GCC 10 that fixes this issue

  • Oh, I see. The crash isn't really in the preprocessor itself, but the preprocessor is generating incorrect `#line` directives which cause the later profile pass to crash. So really two bugs, I guess. – Nate Eldredge Sep 30 '21 at 15:13