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