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

            Bug ID: 102505
           Summary: [10/11/12 Regression] ICE in verify_sra_access_forest,
                    at tree-sra.c:2368
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20200126 and 20200202, at -O2+ :
(case derived from g++.dg/cpp0x/nsdmi-virtual1a.C)
(gcc configured with --enable-checking=yes)


$ cat z1.cc
struct A
{
  A(): i(42) { }
  long double i;
  int f() { return i; }
};

struct D : A { int pad; };

struct B : virtual D
{
  int j = i + f();
  int k = A::i + A::f();
};

struct C: B { int pad; };

int main()
{
  C c;
  if (c.j != 84 || c.k != 84)
    __builtin_abort();
}


$ g++-12-20210926 -c z1.cc -O2
during GIMPLE pass: esra
z1.cc: In function 'int main()':
z1.cc:23:1: internal compiler error: in verify_sra_access_forest, at
tree-sra.c:2368
   23 | }
      | ^
0x1247974 verify_sra_access_forest(access*)
        ../../gcc/tree-sra.c:2367
0x1247c31 verify_all_sra_access_forests()
        ../../gcc/tree-sra.c:2434
0x124be95 analyze_all_variable_accesses
        ../../gcc/tree-sra.c:3497
0x124c916 perform_intra_sra
        ../../gcc/tree-sra.c:4673

Reply via email to