5 ! Check for calling convention consitency
6 ! in procedure-pointer assignments.
13 !GCC$ ATTRIBUTES CDECL :: sub2
16 !GCC$ ATTRIBUTES STDCALL :: sub3
19 !GCC$ ATTRIBUTES FASTCALL :: sub4
23 !gcc$ attributes cdecl :: cdecl
24 !gcc$ attributes stdcall :: stdcall
25 procedure(), pointer :: ptr
26 procedure(), pointer :: cdecl
27 procedure(), pointer :: stdcall
28 procedure(), pointer :: fastcall
29 !gcc$ attributes fastcall :: fastcall
38 ptr => sub3 ! { dg-error "mismatch in the calling convention" }
39 ptr => sub4 ! { dg-error "mismatch in the calling convention" }
40 cdecl => sub3 ! { dg-error "mismatch in the calling convention" }
41 cdecl => sub4 ! { dg-error "mismatch in the calling convention" }
42 stdcall => sub1 ! { dg-error "mismatch in the calling convention" }
43 stdcall => sub2 ! { dg-error "mismatch in the calling convention" }
44 stdcall => sub4 ! { dg-error "mismatch in the calling convention" }
45 fastcall => sub1 ! { dg-error "mismatch in the calling convention" }
46 fastcall => sub2 ! { dg-error "mismatch in the calling convention" }
47 fastcall => sub3 ! { dg-error "mismatch in the calling convention" }