Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2013 16:27:41 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        mexas@bristol.ac.uk
Cc:        fortran@freebsd.org
Subject:   Re: gfortran46: Error: Type of argument 'z' in call to 'dimag' at (1) should be COMPLEX(16), not COMPLEX(8)
Message-ID:  <20130710232741.GA61961@troutmask.apl.washington.edu>
In-Reply-To: <201307102315.r6ANFSwG014115@mech-cluster241.men.bris.ac.uk>
References:  <201307102315.r6ANFSwG014115@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 11, 2013 at 12:15:28AM +0100, Anton Shterenlikht wrote:
> These errors are from french/aster on amd64.
> I think I need to rebuld lang/gcc after the
> recent updates to binutils, but anyway,
> which command line options to gfortran46
> would lead to this error?
> 
> These routines are GNU extensions specifically for complex(8),
> e.g.: http://gcc.gnu.org/onlinedocs/gcc-4.6.4/gfortran/AIMAG.html#AIMAG
> 
> Messages de compilation
> =======================
> /usr/ports/french/aster/work/aster-full-src-10.8.0/instdir/STA10.8/bibfor/algeline/dcargu.f:34.18:
> 
>         IF (DIMAG(C).GT.0.D0) THEN                                      
>                   1
> Error: Type of argument 'z' in call to 'dimag' at (1) should
> be COMPLEX(16), not COMPLEX(8)

Need to see the declaration for C.  My guess is that it is declared
as 'complex c' or 'complex*8 c'.  In either case, this is the single
precision complex type.  The program is using the specific intrinsic
function dimag, which expects a double precision complex argument. 

The correct fixes are to properly declare the variables via Fortran's
kind type parameter and to use generic intrinsic functions.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130710232741.GA61961>