[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2019-02-03 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #13 from Thomas Koenig  ---
The application of this patch caused PR 89079.

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2019-02-03 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

Thomas Koenig  changed:

   What|Removed |Added

 Status|WAITING |NEW

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2019-02-03 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030
Bug 47030 depends on bug 89079, which changed state.

Bug 89079 Summary: "Invalid compiler error: Segmentation fault" in module with 
"equivalence" statement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89079

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |DUPLICATE

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2019-02-03 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

Thomas Koenig  changed:

   What|Removed |Added

 Depends on||89079
 CC||airplanemath at aol dot com

--- Comment #12 from Thomas Koenig  ---
*** Bug 89079 has been marked as a duplicate of this bug. ***


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89079
[Bug 89079] "Invalid compiler error: Segmentation fault" in module with
"equivalence" statement

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2019-01-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #11 from Dominique d'Humieres  ---
See https://gcc.gnu.org/ml/fortran/2019-01/msg00038.html for comments.

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2019-01-04 Thread marco_atzeri at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

marco atzeri  changed:

   What|Removed |Added

  Attachment #44949|0   |1
is obsolete||

--- Comment #10 from marco atzeri  ---
Created attachment 45348
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45348=edit
updated patch for 7.3.0 - validated for style

refreshed patch that passes the 
 check_GNU_style.sh control.

Only formatting and removal of not needed comments versus previous one.
Previous one was applied on 7.4 for cygwin binary package without any build
problem

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2018-11-03 Thread marco_atzeri at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #9 from marco atzeri  ---
It seems the patch works, just not as I was expecting.

The code allows to export the variables in the common block

--
$ cat mydll-3.f90
! 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
---

With gcc-7.3.0 the test case fails as usual

 X =0.
 In program: X =1.

with the patch it works.

 X =1.
 In program: X =1.

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2018-11-03 Thread marco_atzeri at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #8 from marco atzeri  ---
Created attachment 44950
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44950=edit
test case for patch

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2018-11-02 Thread marco_atzeri at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #7 from marco atzeri  ---
I am trying to update the draft patch of Tobias to gcc-7.3.0
the current gcc on cygwin.

The attached patch builds but does not solve the problem of

 !GCC$ attributes dllexport :: /mydata/
   1
Error: Invalid character in name at (1)

nor 

 !GCC$ attributes dllexport :: mydata
1
Warning: Unused variable ‘mydata’ declared at (1) [-Wunused-variable]


I see two possibilities:

1) the original path was missing the portion of interpreting "/mydata/" as
   valid symbol

2) my guess of "com->head->attr" for original "common_sym->attr" is wrong

and eventually both applies.

Any suggestion for solving "Error: Invalid character in name at (1)" ?

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2018-11-02 Thread marco_atzeri at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #6 from marco atzeri  ---
Created attachment 44949
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44949=edit
updated patch for 7.3.0

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2017-04-09 Thread marco_atzeri at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

marco atzeri  changed:

   What|Removed |Added

 CC||marco_atzeri at yahoo dot it

--- Comment #5 from marco atzeri  ---
The issue is still pending on 

$ gfortran --version
GNU Fortran (GCC) 6.3.0

 !GCC$ ATTRIBUTES DLLIMPORT :: /cb1/
   1
Error: Invalid character in name at (1)

There is any workaround that allows common block to be
exported / imported ?

[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2015-10-21 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2015-10-21
 Ever confirmed|0   |1

--- Comment #4 from Dominique d'Humieres  ---
Compiling the first test with -Wall gives the warning

 !GCC$ attributes dllexport :: mydata
1
Warning: Unused variable 'mydata' declared at (1) [-Wunused-variable]

for 5.2.0 and 6.0, without ' [-Wunused-variable]' for 4.8 and 4.9.

Compiling the second test gives

f951: warning: 'dllexport' attribute directive ignored [-Wattributes]

for 4.8 and 4.9 and an ICE for 5.2.0 and 6.0 (pr68040).

I don't get any warning for the third test for 4.8 up to trunk (6.0).


[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2012-03-02 Thread eh.toussaint at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

Erik Toussaint eh.toussaint at gmail dot com changed:

   What|Removed |Added

 CC||eh.toussaint at gmail dot
   ||com

--- Comment #3 from Erik Toussaint eh.toussaint at gmail dot com 2012-03-02 
22:17:52 UTC ---
(In reply to comment #0)

For both program units, if I add 'implicit none' I get the following error:

!GCC$ attributes dllexport :: mydata
1
Error: Symbol 'mydata' at (1) has no IMPLICIT type

So 'mydata' is treated as the identifier of a local entity. Which makes sense,
because a common block and a local entity can have the same name (with certain
restrictions; see 16.3.1 and 16.3.2 in f2008).

Looking at the syntax of the Intel Fortran compiler, the name of the common
block has to be between slashes:

!DEC$ ATTRIBUTES DLLEXPORT :: /X/

http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/win/compiler_f/bldaps_for/win/bldaps_share_datadlls.htm

Trying this with gfortran gives an error:

!GCC$ attributes dllexport :: /mydata/
   1
Error: Invalid character in name at (1)


P.s.:

 !-
 module m
real :: x
common /mydata/ x
!GCC$ attributes dllexport :: mydata
 end module
 !-
 
 I get the warning:
 
   f951: warning: ‘dllexport’ attribute directive ignored [-Wattributes]

I get an error (I'm using MinGW GCC 4.6.2):

m.f90:5:0: error: external linkage required for symbol 'mydata' because of
'dlle
xport' attribute


[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2011-01-07 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2011-01-07 
22:22:15 UTC ---
Created attachment 22930
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22930
Draft patch

Draft patch attached (untested).
TODO: Warn if the same COMMON block has different ext_attr in different scopes
of the same translation unit.

 * * *

(In reply to comment #1)
 Is this related to/dupe of PR42568?

No - those are different issues.


[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA

2010-12-27 Thread dfranke at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

Daniel Franke dfranke at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu.org

--- Comment #1 from Daniel Franke dfranke at gcc dot gnu.org 2010-12-27 
23:34:45 UTC ---
Is this related to/dupe of PR42568?