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/32391] Generate wrong optimization code on fortran 77



------- Comment #6 from sunjoong at gmail dot com  2007-06-18 16:07 -------
Thanks again, Tobias

$ uname -a
Linux newton 2.6.12-gentoo-r10 #1 Sun Sep 4 13:29:37 KST 2005 i686 Intel(R)
Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux

$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.2
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --disable-libunwind-exceptions
--disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2)


I had tested it with this step;

    $ gfortran -O0 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
    $ gfortran -O1 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali

    $ wget -O - http://ftp.g95.org/g95-x86-linux.tgz | tar xvfz -
    $ export PATH="$PATH:./g95-install/bin"
    $ g95 -O0 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
    $ g95 -O1 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali

    $ emerge =sys-devel/gcc-4.2.0                                     # install
gcc-4.2.0 and gfortran
    $ gcc-config i686-pc-linux-gnu-4.2.0
    $ source /etc/profile
    $ epm -e =sys-devel/gcc-4.1.2                                      # remove
gcc-4.1.2

    $ gfortran -O0 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
    $ gfortran -O1 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali

    $ emerge =sys-devel/gcc-4.0.4                                     # install
gcc-4.0.4 and gfortran
    $ gcc-config i686-pc-linux-gnu-4.0.4
    $ source /etc/profile
    $ epm -e =sys-devel/gcc-4.2.0                                      # remove
gcc-4.2.0

    $ gfortran -O0 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
    $ gfortran -O1 -o TMalign TMalign.f
    $ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali


After then, I loged in another machine;

$ uname -a
Linux gene.kias.re.kr 2.6.3-gene #3 SMP Wed Jan 19 00:10:01 KST 2005 i686
unknown unknown GNU/Linux

$ g77 -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --enable-long-long
--enable-__cxa_atexit --enable-clocale=gnu
--enable-languages=c,c++,ada,f77,objc,java,pascal
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)

$ g77 -O0 -o TMalign TMalign.f
$ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
$ g77 -O1 -o TMalign TMalign.f
$ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali

$ pgf77 -O0 -o TMalign TMalign.f
$ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali
$ pgf77 -O1 -o TMalign TMalign.f
$ ./TMalign 1aquA.pdb 1avaC.pdb | grep ^Ali


Which do you think the reson for this difference be for fortran compiler or c
compiler?

2007/6/19, Tobias Burnus <burnus@net-b.de>:
> As said: It works here with 4.1.3 20070521, 4.2.1 20070604 and 20070618,
> 4.3.0 20070618. It also work with my g95, Intel Fortran and sunf95
> compilers. In all cases I get:
> 
> Aligned length=  91, RMSD=  6.35, TM-score=0.24762, ID=0.024
> 
> I'm on x86_64-unknown-linux-gnu (openSUSE Factory) and it works both in
> 32 and 64 bit mode with no option, -O0, -O1, -O2, -O3, -O3 -ffast-math.
> 
> 
> What is your platform (CPU type and operating system) and what is your
> exact version of gfortran? (Both information is shown by "gfortran -v".)
> (You are really only using "-O1" and not any other flags, are you?)
> 
> Tobias
> 


-- 


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


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