public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Warning: Non-zero imaginary part discarded in conversion from 'COMPLEX(8)' to 'REAL(8)'
@ 2016-09-07 16:25 Anton Shterenlikht
  0 siblings, 0 replies; only message in thread
From: Anton Shterenlikht @ 2016-09-07 16:25 UTC (permalink / raw)
  To: fortran

I get this warning (FreeBSD 11-current amd64):

gfortran6 -c -O -Wall -g -fsign-zero mterm.f90
mterm.f90:10:4:

 use fun
    1
Warning: Non-zero imaginary part discarded in conversion from 'COMPLEX(8)' to 'REAL(8)' at (1) [-Wconversion]

I'm not sure what object the warning refers to.

From mterm.f90:

      9 module mterm
     10 use fun
     11 implicit none
     12
     13 complex( kind=fk ) :: z
     14 character( len=80 ) :: fmt
     15

Lines 1-8 are comments and blank lines.

This is the beginning of module fun.f90:

      8 module fun
      9 use iso_fortran_env
     10 implicit none
     11 private
     12 public :: fk, pi, eps, hugefk, tinyfk, one, half, zerop,    &
     13  zerom, cmplxj, zinv, strip1, epp
     14 !, crab
     15
     16 integer, parameter :: fk = real64
     17 real( kind=fk ), parameter :: one = 1.0_fk, half = 0.5_fk,  &
     18   pi = 3.14159265358979323846264338327950288419_fk,         &
     19   eps = epsilon( one ), hugefk = huge( one ),               &
     20   tinyfk = tiny( one ), zerop = 0.0_fk, zerom = -0.0_fk
     21 complex( kind=fk ), parameter :: cmplxj = ( 0, 1 )

lines 1-7 are comments and blanks.

Again, I'm trying to understand which object the warning refers to.

Thanks

Anton

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-07 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07 16:25 Warning: Non-zero imaginary part discarded in conversion from 'COMPLEX(8)' to 'REAL(8)' Anton Shterenlikht

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).