This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47030] New: !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Dec 2010 10:48:57 +0000
- Subject: [Bug fortran/47030] New: !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030
Summary: !GCC$ Attributes do not work for COMMON variables in
procedures and BLOCK DATA
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
Cf. report by Arjen Markus at
http://gcc.gnu.org/ml/fortran/2010-12/msg00124.html -- There is also a Windows
example.
Under Linux DLLEXPORT is not supported and thus there is a warning, which makes
testing very convenient. If I do now:
!-------------------------
subroutine print
real :: x
!GCC$ attributes dllexport :: mydata
common /mydata/ x
write(*,*) 'X = ', x
end subroutine print
!-------------------------
it simply compiles - i.e. the DLLEXPORT is ignored. However, if I use:
!-------------------------
module m
real :: x
common /mydata/ x
!GCC$ attributes dllexport :: mydata
end module
!-------------------------
I get the warning:
f951: warning: âdllexportâ attribute directive ignored [-Wattributes]
Which directly implies that the attribute it not taken into account for COMMON
blocks defined in SUBROUTINE/FUNCTION.
Same problem for BLOCK DATA: No warning for
block data
real alpha, beta
common /vector/ alpha,beta
data alpha/3.14/, beta/2.71/
!GCC$ attributes dllexport :: vector
end