154359Sroberto/* { dg-do compile } */
254359Sroberto/* { dg-options "-O2 -fdump-ipa-icf -fno-inline"  } */
354359Sroberto
454359Srobertostruct str
554359Sroberto{
654359Sroberto  unsigned a:1, b:1;
754359Sroberto};
854359Sroberto
954359Srobertostatic struct str test;
1054359Sroberto
1154359Srobertounsigned foo(struct str *s)
1254359Sroberto{
1354359Sroberto  return s->a;
1454359Sroberto}
1554359Sroberto
1654359Srobertounsigned bar(struct str *s)
1754359Sroberto{
1854359Sroberto  return s->a;
1954359Sroberto}
2054359Sroberto
2154359Srobertoint main()
2254359Sroberto{
2354359Sroberto  test.a = 0;
2454359Sroberto  test.b = 1;
2554359Sroberto
2654359Sroberto  return foo (&test) == bar (&test);
2754359Sroberto}
2854359Sroberto
2954359Sroberto/* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf"  } } */
3054359Sroberto/* { dg-final { cleanup-ipa-dump "icf" } } */
3154359Sroberto