[Bug tree-optimization/87885] New: ICE in release_ssa_name_fn with -fprofile-report

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 5 18:17:00 GMT 2018


            Bug ID: 87885
           Summary: ICE in release_ssa_name_fn with -fprofile-report
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Starting from r247882 I see:

$ ./xgcc -B. /tmp/ice.ii -c -fprofile-report -O  -c -Wall
during GIMPLE pass: fre
/tmp/ice.ii: In function ‘void ai()’:
/tmp/ice.ii:43:6: internal compiler error: Segmentation fault
   43 | void ai() {
      |      ^~
0x1466f7e crash_signal
0x7ffff6bc310f ???
0x153c78f estimate_move_cost(tree_node*, bool)
0x153d2b3 estimate_num_insns(gimple*, eni_weights*)
0x14dc9aa gimple_account_profile_record
0xd63ddd account_profile_record(profile_record*, int)
0x12eccac check_profile_consistency

$ cat ice.ii

template <typename> class a {};
template <typename, typename> class b;
template <typename> struct c;
template <typename g> struct c<a<g>> {
  using d = a<g>;
  using e = g;
  using f = long;
  static e aa(d, f);
struct h : c<a<int>> {};
struct i {
  struct j {
    int k;
    j(j &&) { k = int(); }
  struct l : a<int>, j {};
  i(i &&) = default;
  ~i() {
    long ab = m.k;
    m.k ? h::aa(m, ab) : int();
  l m;
class n : i {
class q {
  template <typename o, typename p> q(o, o, p);
  n ae() {
      n r(2);
      return r;
template <typename s, typename t, typename af> void operator<<(b<t, af>, s p2)
template <typename, typename> class b {};
double ah;
void ai() {
  q aj(ah, ah, ai);
  b<int, int> ak;
  ak << aj;

The problem is that we call estimate_run_insns for a gimple statement that has
a SSA NAME in free list

More information about the Gcc-bugs mailing list