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/72810] [7 Regression] error: type mismatch for case label in switch statement


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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Simpler test case:

extern void foo (void);
extern void bar (void);

void
test (int i)
{
  if (i == 1)
    return;

  typedef int t;
  t j = i;
  switch (j)
    {
    case 1:
    case 2:
      foo ();
      break;
    case 7:
      bar ();
      break;
    }
}

Patch: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00452.html

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