Date: Fri, 12 Jul 2013 12:05:07 +0100 (BST) From: Anton Shterenlikht <mexas@bris.ac.uk> To: mexas@bristol.ac.uk, sgk@troutmask.apl.washington.edu 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: <201307121105.r6CB57qE098854@mech-cluster241.men.bris.ac.uk> In-Reply-To: <20130712051417.GA71107@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
>From sgk@troutmask.apl.washington.edu Fri Jul 12 07:25:06 2013 > >You need to look at -fdump-tree-original. >This produces gcc's intermediate code, and >may show the promotion. on ia64 the intermediate code is identical with and without -fdefault-real-8: $ cat z.f90 complex*16 :: z z = (1,2) write (*,*) dimag(z) end $ gfortran46 -fdump-tree-original z.f90 $ mv z.f90.003t.original z1 $ gfortran46 -fdump-tree-original -fdefault-real-8 z.f90 $ diff z.f90.003t.original z1 $ cat z.f90.003t.original MAIN__ () { complex(kind=8) z; z = __complex__ (1.0e+0, 2.0e+0); { struct __st_parameter_dt dt_parm.0; dt_parm.0.common.filename = &"z.f90"[1]{lb: 1 sz: 1}; dt_parm.0.common.line = 3; dt_parm.0.common.flags = 128; dt_parm.0.common.unit = 6; _gfortran_st_write (&dt_parm.0); { real(kind=8) D.719; D.719 = IMAGPART_EXPR <z>; _gfortran_transfer_real_write (&dt_parm.0, &D.719, 8); } _gfortran_st_write_done (&dt_parm.0); } } main (integer(kind=4) argc, character(kind=1) * * argv) { static integer(kind=4) options.1[8] = {68, 511, 0, 0, 0, 1, 0, 1}; _gfortran_set_args (argc, argv); _gfortran_set_options (8, &options.1[0]); MAIN__ (); return 0; } $ Anton
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307121105.r6CB57qE098854>