1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin PR c++/41020
3 // { dg-do compile }
4 
5 extern "C"
6 {
7   int fork (void);
8 }
9 
10 class frok
11 {
12   int this_errno;
13   friend int fork (void);
14 };
15 
16 extern "C" int
fork(void)17 fork (void)
18 {
19   frok grouped;
20   return grouped.this_errno;
21 }
22