public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/15151] New: -m64 flag causes incorrect logical i/o (g77)
@ 2004-04-26 16:55 eesrjhc at bath dot ac dot uk
  2004-04-26 19:34 ` [Bug fortran/15151] " ebotcazou at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: eesrjhc at bath dot ac dot uk @ 2004-04-26 16:55 UTC (permalink / raw)
  To: gcc-bugs

$ cat pox.f
      LOGICAL LL
      LL=.TRUE.
      IF (LL) THEN
        WRITE(*,*)'TRUE ',LL
      ELSE
        WRITE(*,*)'FALSE ',LL
      ENDIF
      STOP
      END


When compiled with:
$ /usr/local/gcc-3.3.3/bin/g77 -Wall -m64 -o pox pox.f
produces an executable that is linked thus:
$ ldd ./pox
        libg2c.so.0 =>   /usr/local/gcc-3.3.3/lib/sparcv9//libg2c.so.0
        libm.so.1 =>     /usr/lib/64/libm.so.1
        libgcc_s.so.1 =>         /usr/local/gcc-3.3.3/lib/sparcv9//libgcc_s.so.1
        libc.so.1 =>     /usr/lib/64/libc.so.1
        libdl.so.1 =>    /usr/lib/64/libdl.so.1
        /usr/platform/SUNW,Sun-Blade-100/lib/sparcv9/libc_psr.so.1
and produces this output:
$ ./pox
 TRUE  F

If compiled without the -m64 flag, and the environment variable LD_LIBRARY_PATH
is changed to /usr/local/gcc-3.3.3/lib (from /usr/local/gcc-3.3.3/lib/sparcv9)
then the output is correct:
$ ./pox
 TRUE  T
$ ldd ./pox
        libg2c.so.0 =>   /usr/local/gcc-3.3.3/lib//libg2c.so.0
        libm.so.1 =>     /usr/lib/libm.so.1
        libgcc_s.so.1 =>         /usr/local/gcc-3.3.3/lib//libgcc_s.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1


gcc built with:
../gcc-3.3.3/configure --prefix=/usr/local/gcc-3.3.3 \
 --enable-languages=c,fortran,c++
make bootstrap
su
umask 022
make install

-- 
           Summary: -m64 flag causes incorrect logical i/o (g77)
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eesrjhc at bath dot ac dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-06-19 15:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-26 16:55 [Bug fortran/15151] New: -m64 flag causes incorrect logical i/o (g77) eesrjhc at bath dot ac dot uk
2004-04-26 19:34 ` [Bug fortran/15151] " ebotcazou at gcc dot gnu dot org
2004-04-27 21:57 ` [Bug libf2c/15151] " pinskia at gcc dot gnu dot org
2004-04-27 22:11 ` pinskia at gcc dot gnu dot org
2004-04-28  1:40 ` bdavis9659 at comcast dot net
2004-04-30 15:51 ` [Bug fortran/15151] " eesrjhc at bath dot ac dot uk
2004-04-30 15:54 ` [Bug libf2c/15151] " pinskia at gcc dot gnu dot org
2004-04-30 15:57 ` bangerth at dealii dot org
2004-05-01 15:00 ` pinskia at gcc dot gnu dot org
2004-05-02  7:49 ` ebotcazou at gcc dot gnu dot org
2004-05-06 11:33 ` [Bug libf2c/15151] incorrect logical i/o in 64-bit mode bdavis9659 at comcast dot net
2004-06-14 17:25 ` [Bug libf2c/15151] [g77] " mmitchel at gcc dot gnu dot org
2004-06-19 11:12 ` toon at moene dot indiv dot nluug dot nl
2004-06-19 15:53 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).