Bug#650344: gfortran-4.4: Unusuall and/or wrong conversion in gfortran
Package: gfortran-4.4
Version: 4.4.5-8
Severity: normal
Tags: upstream
gfortran does not report Error o Warnig for type mismatch in calls and
data statements (see example). When an integer is assigned in a data statement
to a double precision it performs as expected, but when a real is used it
introduces round off errors instead of padding zeros
When the mistmatch is the call of a subroutine it completely fails, the
compiler SHOULD indicate Error. Here is a test program
C test of bugs
double precision q(3)
data q/0.16D00,0.08,11/
print *,(q(i),i=1,3)
q(1)=q(1)+1
call malo(q)
end
subroutine malo(q)
real q(3)
print *, (q(i),i=1,3)
return
end
+++++++++++++++++++++++++++++++++++++++++
Compiles without warnigs with -Wall switch;
Compiles with warnigs with -Wconversion, but it places the wrong statements
at the level of the legal addition of double precision and integer!!!
****************************************
Output generated
0.16000000000000000 7.99999982118606567E-002 11.000000000000000
2.72848404E-14 1.8950000 2.0000000
-- System Information:
Debian Release: 6.0.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-H (SMP w/4 CPU cores)
Locale: LANG=es_AR.utf8, LC_CTYPE=es_AR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gfortran-4.4 depends on:
ii gcc-4.4 4.4.5-8 The GNU C compiler
ii gcc-4.4-base 4.4.5-8 The GNU Compiler Collection (base
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libc6-dev 2.11.2-10 Embedded GNU C Library: Developmen
ii libgfortran3 4.4.5-8 Runtime library for GNU Fortran ap
ii libgmp3c2 2:4.3.2+dfsg-1 Multiprecision arithmetic library
ii libmpfr4 3.0.0-2 multiple precision floating-point
gfortran-4.4 recommends no packages.
Versions of packages gfortran-4.4 suggests:
ii gfortran-4.4-doc 4.4.4.nf1-1 documentation for the GNU Fortran
pn gfortran-4.4-multilib <none> (no description available)
pn libgfortran3-dbg <none> (no description available)
-- no debconf information
Reply to: