Patch for bug 47030

Marco Atzeri marco.atzeri@gmail.com
Sat Nov 3 09:11:00 GMT 2018


I uploaded a patch for 7.3.0, based on previous draft of Tobias,
plus 3 test cases.

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

With that the dllexport of variable in the common block
now works for this variant of "!GCC$ attributes dllimport"

---------------------------------
$ cat *3.f90
! call_mydll.f90 --
!     Call the library
!
program call_mydll

     real :: x
     common /mydata/ x
     !GCC$ attributes dllimport :: x

     x = 1.0

     call print

     write(*,*) 'In program: X = ', x
end program call_mydll
! mydll.f90 --
!     Simple library (to be compiled and linked as DLL/SO)
!
subroutine print

    real :: x
    common /mydata/ x
!GCC$ attributes dllexport :: x

    write(*,*) 'X = ', x

end subroutine print
------------------------------------

./call_mydll-3.exe
  X =    1.00000000
  In program: X =    1.00000000



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus



More information about the Fortran mailing list