Bug 31637 - warn about implicit conversion causing loss of precision
Summary: warn about implicit conversion causing loss of precision
Status: RESOLVED DUPLICATE of bug 27866
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-19 20:28 UTC by Vivek Rao
Modified: 2007-04-19 21:45 UTC (History)
3 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 Vivek Rao 2007-04-19 20:28:43 UTC
For the program

program main
implicit none
real :: xx
double precision :: yy
call random_seed()
call random_number(yy)
xx = yy ! assign double to single
print*,"yy =",yy
print*,"xx =",xx
end program main

g95 -Wall -Wextra says

In file xreal_dp.f90:7

xx = yy
     1
Warning (140): Implicit conversion at (1) may cause
precision loss

I request a similar warning from gfortran. None is currently given when compiling with 

gfortran -Wall -pedantic -std=f2003 xreal_dp.f90 .

Vivek Rao
Comment 1 Andrew Pinski 2007-04-19 21:45:25 UTC

*** This bug has been marked as a duplicate of 27866 ***