[Bug ipa/116526] [13/14/15/16 Regression] ICE: in get_partitioning_class, at symtab.cc:2190 with -O -fopenacc -fprofile-generate -flto

pheeck at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 16 14:58:23 GMT 2026


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

--- Comment #9 from Filip Kastl <pheeck at gcc dot gnu.org> ---
If I do

```
  FOR_EACH_DEFINED_FUNCTION (node)
    {
      push_cfun (DECL_STRUCT_FUNCTION (node->decl));
      cleanup_tree_cfg ();
      pop_cfun ();
    }
```

at the beginning of 'tree_profiling ()', I avoid the ICE.  That snippet removes
the call memcpy together with a part of the CFG.  Consequently, 'tree_profiling
()' never creates gcov3.g.

My hypothesis is that 'tree_profiling ()' doesn't expect 'cleanup_tree_cfg ()'
to remove the statements it does.  It gets confused and thinks that the code it
inserted is still present and maybe modifies the symbol based on that
confusion?  I'll try to figure out if that's what's happening.


More information about the Gcc-bugs mailing list