(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
warn/
Wexceptions3.C
// PR c++/81660

void bar (int);

void
fn (int b)
{
  if (b)
    throw;
  try
    {
      bar (3);
    }
  catch (int)
    {
    }
  catch (int) // { dg-warning "will be caught by earlier handler" }
    {
    }
  catch (const int) // { dg-warning "will be caught by earlier handler" }
    {
    }
  catch (int &) // { dg-warning "will be caught by earlier handler" }
    {
    }
  catch (const int &) // { dg-warning "will be caught by earlier handler" }
    {
    }
}