[Bug fortran/18998] New: Gfortran produces wrong output (c/f to g77)

deji_aking at yahoo dot ca gcc-bugzilla@gcc.gnu.org
Tue Dec 14 19:29:00 GMT 2004


I'm sorry the summary seems so vague, I'm not so sure why it's behaving that way.
Executing the attached code (a simple i/o around a numerical recipe FFT
subroutine) produces the following;
[deji@rhema ~]$ gfortran fft2.for -o resu2
[deji@rhema ~]$ ./resu2
   0.000000       0.000000
   0.000000       0.000000
   4.000000       0.000000
   0.000000       0.000000
   0.000000       0.000000
   0.000000       0.000000
   0.000000       4.000000
   0.000000       0.000000
STOP 0
Doing the same using g77 produces;
[deji@rhema ~]$ g77 fft2.for -o resu2
[deji@rhema ~]$ ./resu2
  0.  0.
  0.  0.
  4.  0.
  0.  0.
  0.  0.
  0.  0.
  4.  0.
  0.  0.

The g77 output is actually right and the gfortran one, wrong (swaping the
imaginary part for the real).

-- 
           Summary: Gfortran produces wrong output (c/f to g77)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: deji_aking at yahoo dot ca
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux


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



More information about the Gcc-bugs mailing list