http://gcc.gnu.org/ml/fortran/2009-08/msg00095.html
Excess errors: /usr/home/sgk/gcc/gcc4x/gcc/testsuite/gfortran.dg/compiler-directive_1.f90:33: Error: Mismatch in the procedure pointer assignment at (1): mismatch in the calling convention /usr/home/sgk/gcc/gcc4x/gcc/testsuite/gfortran.dg/compiler-directive_1.f90:34: Error: Mismatch in the procedure pointer assignment at (1): mismatch in the calling convention Reduced example: Should work, but shows: ptr => sub 1 Error: Mismatch in the procedure pointer assignment at (1): mismatch in the calling convention (gdb) p lvalue->symtree->n.sym->attr.ext_attr $4 = 17 (gdb) p rvalue->symtree->n.sym->attr.ext_attr $5 = 15 EXT_ATTR_DLLIMPORT = 0 -> 1<<0 = 1 EXT_ATTR_DLLEXPORT = 1 -> 1<<1 = 2 EXT_ATTR_STDCALL = 2 -> 1<<2 = 4 EXT_ATTR_CDECL = 3 -> 1<<3 = 8 EXT_ATTR_FASTCALL = 4 -> 1<<4 = 16 Thus we have for LHS: EXT_ATTR_FASTCALL | EXT_ATTR_DLLIMPORT and for RHS: the first 4 items In other words: Seemingly random data. interface subroutine sub() !GCC$ ATTRIBUTES CDECL :: sub end subroutine sub end interface procedure(), pointer :: ptr !GCC$ ATTRIBUTES CDECL :: sub ptr => sub end Presumably introduced with: URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150589 Log: 2009-08-05 Tobias Burnus <bur...@net-b.de> PR fortran/40955 -- Summary: [4.5 Regression] Wrongly rejected proc pointer assignment with CDECL (compiler-directive_1.f90) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41034