Bug 17541 - [3.4 Regression] [g77] data statements with double precision constants fail
Summary: [3.4 Regression] [g77] data statements with double precision constants fail
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: 3.4.3
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
: 17727 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-17 22:41 UTC by rkoenker
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rkoenker 2004-09-17 22:41:43 UTC
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)
Comment 1 Andrew Pinski 2004-09-18 00:10:02 UTC

*** This bug has been marked as a duplicate of 15397 ***
Comment 2 Toon Moene 2004-09-18 12:01:55 UTC
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 ...
Comment 3 Bud Davis 2004-09-19 06:11:07 UTC
proposed patch:


http://gcc.gnu.org/ml/fortran/2004-09/msg00176.html
Comment 5 Andrew Pinski 2004-09-22 21:22:33 UTC
Fixed.
Comment 6 Andrew Pinski 2004-09-29 15:48:50 UTC
*** Bug 17727 has been marked as a duplicate of this bug. ***