Discussion:
Patch for bug 47030
Marco Atzeri
2018-11-03 09:11:04 UTC
Permalink
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
Thomas Koenig
2018-11-03 14:40:08 UTC
Permalink
Hi Marco,
Post by Marco Atzeri
I uploaded a patch for 7.3.0, based on previous draft of Tobias,
plus 3 test cases.
First, thanks for volunteering to fix this! We welcome any
contribution (there is not danger of running out of bugs to
fix at the moment).

Do you have a copyright assignment to the FSF? We need this to accept
anything but trivial patches. For details, see
https://www.gnu.org/software/gcc/contribute.html .

Finally, for patch submission, there are certain guidelines that
we like to follow. If you read the list, you'll see how it is
done soon enough, but it is also detailed at the link above.

Looking forward to your contributions!

Regards

Thomas
Marco Atzeri
2018-11-07 17:48:37 UTC
Permalink
Post by Thomas Koenig
Hi Marco,
Post by Marco Atzeri
I uploaded a patch for 7.3.0, based on previous draft of Tobias,
plus 3 test cases.
First, thanks for volunteering to fix this!  We welcome any
contribution (there is not danger of running out of bugs to
fix at the moment).
Do you have a copyright assignment to the FSF? We need this to accept
anything but trivial patches. For details, see
https://www.gnu.org/software/gcc/contribute.html .
I have not. Can you send me the form ?
Post by Thomas Koenig
Finally, for patch submission, there are certain guidelines that
we like to follow. If you read the list, you'll see how it is
done soon enough, but it is also detailed at the link above.
the only thing the "check_GNU_style.sh" complains are
space instead of tab. Anything else ?
Post by Thomas Koenig
Looking forward to your contributions!
Regards
    Thomas
Regards
MArco


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

Loading...