[Bug fortran/41034] [4.5 Regression] Wrongly rejected proc pointer assignment with CDECL (compiler-directive_1.f90)

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 12 08:07:00 GMT 2009



------- Comment #2 from burnus at gcc dot gnu dot org  2009-08-12 08:06 -------
If one looks at the failing test case one finds:

  !gcc$ attributes cdecl :: cdecl
  !gcc$ attributes stdcall :: stdcall
  procedure(), pointer :: ptr
  procedure(), pointer :: cdecl
  procedure(), pointer :: stdcall
  procedure(), pointer :: fastcall
  !gcc$ attributes fastcall :: fastcall

Only the cdecl and stdcall are failing, i.e. those where the attributes cdecl
comes _before_ the PROCEDURE statement.

The problem seems to be gfc_copy_attr:
  dest->ext_attr = src->ext_attr
The issue is that "dest" is alreay set correctly while "src" has the bit
pattern "0". Patch is now regtesting.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-12 08:06:38
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41034



More information about the Gcc-bugs mailing list