Given the program below one is assigned to zero program test double precision x call dbug(x) stop end subroutine dbug(x) double precision x,one data one/1.d0/ write(*,*) one return end rkoenker@welch-gentoo rkoenker $ g77 test.f rkoenker@welch-gentoo rkoenker $ ./a.out 0. rkoenker@welch-gentoo rkoenker $ g77 -v Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/specs Configured with: /var/tmp/portage/gcc-3.4.1-r2/work/gcc-3.4.1/configure --prefix=/usr --bindir=/ usr/x86_64-pc-linux-gnu/gcc-bin/3.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/ include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4 --mandir=/usr/share/gcc-data/ x86_64-pc-linux-gnu/3.4/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/info -- enable-shared --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-system-zlib -- enable-languages=c,c++,f77 --enable-threads=posix --enable-long-long --disable-checking -- disable-libunwind-exceptions --enable-cstdio=stdio --enable-version-specific-runtime-libs --with- gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/include/g++-v3 --with-local-prefix=/ usr/local --disable-werror --enable-shared --enable-nls --without-included-gettext --disable- multilib --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 3.4.1 20040803 (Gentoo Linux 3.4.1-r2, ssp-3.4-2, pie-8.7.6.5)
*** This bug has been marked as a duplicate of 15397 ***
I'm sorry Andrew, but this cannot be a duplicate of 15397, because this bug doesn't involve functions, while function results are the culprit in 15397. Reopening ...
proposed patch: http://gcc.gnu.org/ml/fortran/2004-09/msg00176.html
Subject: Bug 17541 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: bdavis@gcc.gnu.org 2004-09-21 12:54:35 Modified files: gcc/f : bld.c ChangeLog gcc/testsuite : ChangeLog Added files: gcc/testsuite/g77.f-torture/execute: pr17541.f Log message: 2004-09-21 Bud Davis <bdavis9659@comcast.net> PR fortran/17541 * bld.c (ffebld_constant_new_real2_val): Fix typo, PR fortran/17541 * g77.f-torture/execute/pr17541.f: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/f/bld.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.16.14.1&r2=1.16.14.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/f/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.622.2.19&r2=1.622.2.20 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.270&r2=1.3389.2.271 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g77.f-torture/execute/pr17541.f.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
Fixed.
*** Bug 17727 has been marked as a duplicate of this bug. ***