From owner-freebsd-fortran@FreeBSD.ORG Thu Jul 11 17:39:52 2013 Return-Path: Delivered-To: fortran@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8E9FD647 for ; Thu, 11 Jul 2013 17:39:52 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com [207.126.144.129]) by mx1.freebsd.org (Postfix) with ESMTP id 78D031C21 for ; Thu, 11 Jul 2013 17:39:50 +0000 (UTC) Received: from mail-ea0-f171.google.com ([209.85.215.171]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKUd7tyuAKol5MikpmCfG61nvuN8Y3Xm3L@postini.com; Thu, 11 Jul 2013 17:39:51 UTC Received: by mail-ea0-f171.google.com with SMTP id m14so5897807eaj.30 for ; Thu, 11 Jul 2013 10:39:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:date:from:message-id:to:subject:cc:reply-to:in-reply-to :x-gm-message-state; bh=En4WlM5kd+z1ozDwSbUYj6JpE2yzIiFdaOhfRhnU6uE=; b=dEonaHFIBieVq9CfW/9gRew0nWEgYZPifDzLensm4SOD3OjaBRiGz2/SlVreasNT9X qSh+mPUDxIVl7I3RUQc8i6SsoakL/xoBoYCk5Y4KajLE4QZvr7fGvl+Wz+K0lJIf6Yq2 7ldEv7Vmijadw+pHkCpql5iHzGem0qxrfcNCVWFjU+n4MU0CKhWaGyGgLKDiksqOSocQ gxmwWe8Pm3zT9prI/qz0a38G5pZZXeqHYVB311n3Xyf79iAkKGnv7vzpemx9IllGjsga 9uWTIC5VXz2Mw9aSM+3nu1ZUs5nHqFBXNXJw9Z6XGQKl+4bzffE7MUuAFt6CovSf4XmK QdeQ== X-Received: by 10.15.35.129 with SMTP id g1mr43129211eev.2.1373564362256; Thu, 11 Jul 2013 10:39:22 -0700 (PDT) X-Received: by 10.15.35.129 with SMTP id g1mr43129201eev.2.1373564362171; Thu, 11 Jul 2013 10:39:22 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id n45sm70852896eew.1.2013.07.11.10.39.20 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Jul 2013 10:39:20 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id r6BHdIOI089383 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Jul 2013 18:39:18 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id r6BHdI4E089382; Thu, 11 Jul 2013 18:39:18 +0100 (BST) (envelope-from mexas) Date: Thu, 11 Jul 2013 18:39:18 +0100 (BST) From: Anton Shterenlikht Message-Id: <201307111739.r6BHdI4E089382@mech-cluster241.men.bris.ac.uk> To: mexas@bristol.ac.uk, sgk@troutmask.apl.washington.edu Subject: Re: gfortran46: Error: Type of argument 'z' in call to 'dimag' at (1) should be COMPLEX(16), not COMPLEX(8) In-Reply-To: <20130711172542.GA67029@troutmask.apl.washington.edu> X-Gm-Message-State: ALoCoQnHNqOdyOcLG8ee7RfLdh2iMEKmXISUuuqDybOCHNuW3AvrerKs9hnU6qSd6y5qn0E+KqaRHGDmReKKf15GqPfvApavjIDALdja9MYXtDRssw1Liy88jQflQ/BNudQDAjImxjyXe5LaIWEr3txOmPX90+SZ6g== Cc: fortran@freebsd.org X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 17:39:52 -0000 >From sgk@troutmask.apl.washington.edu Thu Jul 11 18:32:18 2013 >On Thu, Jul 11, 2013 at 09:09:22AM +0100, Anton Shterenlikht wrote: >> From sgk@troutmask.apl.washington.edu Thu Jul 11 02:17:08 2013 >> >>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. > >Please fix the quoting mechanism of your email client to >NOT use tab characters. It leads to alot of wasted screen >real estate. as you wish... I use mail(1). I wonder why its developers thought that tab is a good default. > >>$ cat dcargu.f >> FUNCTION DCARGU(C) >> IMPLICIT REAL*8 (A-H,O-Z) >> REAL*8 DCARGU >> COMPLEX*16 C > >> IF (DIMAG(C).GT.0.D0) THEN > >I suspect you are being hit by -fdefault-real-8 or >similar option. If this is the case, you may want >to ask the ASTER developers if they know what that >option actually does. That's what I thought. I'll find exactly what options they use. Thanks Anton