REAL_KINDS: a compilation error in Windows but not in Linux ?
Jorge D'ELIA
jdelia@intec.unl.edu.ar
Sun Aug 14 20:48:00 GMT 2011
1/2) Tobias Burnus wrote:
> Jorge D'Elia wrote:
> > Nevertheless, it is somewhat surprising that, for the same compiler
> > version (4.7.0), this error appears using the wrong flag -std=f2003
> > only when it is compiled in Windows, and not in Linux.
>
> Can you double check? Here it works under Linux as advertised - and I
> do not see a possibilitz how Windows and Linux could differ in this
> respect.
False alarm: a flag remained ill-defined (ie-std=f2003 instead
of -std=f2008) in a component of the Windows version...
Now the source code is compiled nearly in the same way (see point 2/2)
in Linux and Window systems.
2/2) Although as suggested by Tobias Burnus 12/05/2011 17:45:15 UTC,
in "Bug 45823 - Bogus warning for intrinsic module procedures", works
very well, perhaps, there would be another way to remove the
warning shown there, e.g.
module m_test
use ISO_FORTRAN_ENV
implicit none
public
integer, parameter :: irp = REAL_KINDS (2)
end module m_test
!
program test
!use m_test, only : irp ! Tobias Burnus suggestion 2011-05-12 10:35:23 UTC
use m_test ! bogus warning?
implicit none
real (irp) :: x
x = 1.0_irp
end program test
C:\Users\TEST\gfortran --version
GNU Fortran (GCC) 4.7.0 20110419 (experimental) [trunk revision 170140]
Copyright (C) 2011 Free Software Foundation, Inc.
C:\Users\TEST\gfortran -Wall -std=f2008 -c test.f90
test.f90:10.42:
use m_test ! bogus warning?
1
Warning: Type specified for intrinsic function 'compiler_options' at (1) is
ignored
test.f90:10.42:
use m_test ! bogus warning?
1
Warning: Type specified for intrinsic function 'compiler_version' at (1) is
ignored
Now I'm not absolutely sure, but this warning had not seen before in the
Linux version for quad-core.
Regards,
Jorge.
--
More information about the Fortran
mailing list