This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/14395] New: [gfortran] Intrinsic function CMPLX return incorrect with COMPLEX argument


Distilled from NIST F77 compiler validation suite, test FM829.


CMPLEX is not returning the entire value when called with a COMPLEX argument.


$ cat z.f
        COMPLEX BVC,AVC
        AVC = (1.0,0.5)
        BVC = CMPLX(AVC)
        print*,bvc,avc
        end
 
 
$ /usr/local/bin/gfortran -static z.f
$ ./a.out
(   1.000000    ,   0.000000    ) (   1.000000    ,  0.5000000    )
                      ^
                      should be 0.5

Here is how it looks with g77:


$ g77 z.f
$ ./a.out
 (1.,0.5) (1.,0.5)

-- 
           Summary: [gfortran]  Intrinsic function CMPLX return incorrect
                    with COMPLEX argument
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bdavis9659 at comcast dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14395


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]