[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA
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&action=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
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
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&action=edit test case for patch
[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA
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
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&action=edit updated patch for 7.3.0
[Bug fortran/47030] !GCC$ Attributes do not work for COMMON variables in procedures and BLOCK DATA
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 c/24581] Complex arithmetic on special cases is incorrect.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24581 --- Comment #20 from marco atzeri 2010-11-22 14:17:24 UTC --- (In reply to comment #19) > On Mon, 22 Nov 2010, sgk at troutmask dot apl.washington.edu wrote: > > > That -nan is not an infinity is true but irrelevant, because "A complex or > imaginary value with at least one infinite part is regarded as an infinity > (even if its other part is a NaN)." (G.3), so the complex result of the > multiplication *is* an infinity (with one part NaN and one part infinity, > which is a valid representation of complex infinity). I guess that I was misleaded by the status FIXED. Following your reasoning INVALID or WONTFIX are probably more accurate STATUS as the behaviour is not a BUG but a possible implementation. As 0 * Inf = NaN on real/double, it follows that for complex ( 0 + I ) * Inf = 0 * Inf + I * Inf = NaN + I * Inf however the implementation is not symmetric as ( 1 + I*0) * Inf = Inf + 0 * I Of course (Inf + 0 * I) and (NaN + I * Inf) are both complex infinities, but the lack of symmetry is inelegant ;-) The table at C99 G.5.1-2 seems to suggest a symmetric behaviour, of course IMHO
[Bug c/24581] Complex arithmetic on special cases is incorrect.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24581 --- Comment #13 from marco atzeri 2010-11-21 23:16:45 UTC --- (In reply to comment #12) > Note that this specific PR is about *C* not C++. And the issue is supposed to > be "RESOLVED FIXED". Thus, I would suggest first trying to reproduce the > problem in C too and then either reopen this one or a C++ version (search > Bugzilla first for duplicates). Sorry Paolo, I am a bit confused. If the bug is "RESOLVED FIXED" why on 4.5.1 the outcome of the original program is still -0.00e+00 0.00e+00 nan inf
[Bug c/24581] Complex arithmetic on special cases is incorrect.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24581 marco atzeri changed: What|Removed |Added CC||marco_atzeri at yahoo dot ||it --- Comment #11 from marco atzeri 2010-11-21 19:48:40 UTC --- the compiler produce incorrect output also when multiplying pure complex numbers (but not adding them). Using gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) on x86_64 The outcome of the following code is (inf,0) (-nan,inf) (inf,-nan) instead of the expected (inf,0) (0,inf) (inf,0) --- #include #include using namespace std; int main() { complex z; complex z2; complex z3; double a = 0; double b = 1. / a; z = complex (b,a); z2 = complex (0,1); z3 = complex (1,0); std::cout << z << '\n'; z2 = z * z2 ; std::cout << z2 << '\n'; z3 = z * z3 ; }