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/32404] New: Wrong-code with sbdart (valgrind errors, different output)


Spin off from PR 32236.

ftp://ftp.icess.ucsb.edu/pub/esrg/sbdart/sbdart_2.4.tar.gz (33181 lines of
code)

Unpack source and do:
- Delete in tauaero.f:1601 the line
      data wlbaer/0.,0./
- Insert around drt.f:951 the lines
  weq = 0.0_kr
  wfull = 0.0_kr

If one compiles (-O0) the program with g95, sunf95, ifort and gfortran (4.1.3,
4.2.0, 4.3) and compares the output, one finds (drf.f, subroutine stdout1):

- sunf95, ifort and g95 produce identical output except for the 7th column

- gfortran's output differs also in the 7th column, but starting from some row
it also differs in the 4th column; the results for the 4th column are different
depending on the gfortran version

A possible reason might be that some variable has not been initialized,
however, using ifort -check all I could only find the two problems above (weq,
wfull) and "g95" and "g95 -freal=nan -flogical=true -finteger=123456
-pointer=invalid" give the same result.

Some further debugging (in drf.f's stdout1) shows that topup - or more
precisely flup(ntop) - diverges at some point. flup is set via DISORT
(disort.f).

Both g95 and gfortran show quite a lot of uninitialized warnings in valgrind
(over 30), ifort only shows two, sunf95 four.


-- 
           Summary: Wrong-code with sbdart (valgrind errors, different
                    output)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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