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/18998] New: Gfortran produces wrong output (c/f to g77)


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


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