This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with fortran common block in shared library


On 06/01/2017 16:52, Bill Greene wrote:
This problem is not a generic gcc/gfortran one.
If you build the test code on Linux, it works correctly.

Bill


the problem is gfortran one on Windows platform

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68040

If you create a directive like

--------------------------------------
!GCC$ ATTRIBUTES DLLEXPORT :: /cb1/
      integer cvar
      common /cb1/ cvar
--------------------------------------

It produces and error like
--------------------------------------
 !GCC$ ATTRIBUTES DLLEXPORT :: /cb1/
                               1
Error: Invalid character in name at (1)
--------------------------------------

so the DLLEXPORT directive is not correctly
managing "common" as "/cb1/"

I also noted that the "!GCC$" must be at the beginning of the line
otherwise is totally ignored, that is also very hard to note.

Regards
Marco







Attachment: cb_test-3.sh
Description: Text document

Attachment: cb_test-2.sh
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]