This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/79472] [7 Regression] x86-64: Switch table generation fails if default case has different code


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems even unpatched switchconf isn't able to deal with virtual phis:
void foo (int);

void
f1 (int v, int w)
{
  int i;
  if (w)
    {
      foo (23);
      i = 129;
    }
  else
    switch (v)
      {
      case 170:
        i = 27;
        break;
      case 171:
        i = 8;
        break;
      case 172:
        i = 21;
        break;
      case 173:
        i = 18;
        break;
      case 174:
        i = 139;
        break;
      case 175:
        i = 14;
        break;
      case 176:
        i = -14;
        break;
      case 177:
        i = 12;
        break;
      default:
        i = 80;
        break;
      }

 lab:
  foo (i);
}

isn't converted either.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]