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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
constexpr bool foo () { return true; }
volatile int v;

void
bar (int x)
{
  switch (x)
    {
    case 0:
      while (foo ()) ;
      break;
    case 1:
      while (foo ()) {}
      break;
    case 2:
      do ; while (foo ());
      break;
    case 3:
      do {} while (foo ());
      break;
    case 4:
      do {} while (foo ());
      break;
    case 5:
      for (v = 42; foo (); ) ;
      break;
    case 6:
      for (v = 42; foo (); ) {}
      break;
    case 7:
      for (int w = 42; foo (); ) ;
      break;
    case 8:
      for (int w = 42; foo (); ) {}
      break;
    default:
      break;
    }
}

Reply via email to