public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47030] New: !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA
@ 2010-12-21 10:49 burnus at gcc dot gnu.org
  2010-12-27 23:34 ` [Bug fortran/47030] " dfranke at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-21 10:49 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-21 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21 10:49 [Bug fortran/47030] New: !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA burnus at gcc dot gnu.org
2010-12-27 23:34 ` [Bug fortran/47030] " dfranke at gcc dot gnu.org
2011-01-07 23:21 ` burnus at gcc dot gnu.org
2012-03-02 22:18 ` eh.toussaint at gmail dot com
2015-10-21 12:53 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).