What happens to pensions and retirement funds in bankruptcy?

What happens to pensions and retirement funds in bankruptcy?