This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/18566] New: Can vary constants
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Nov 2004 13:23:04 -0000
- Subject: [Bug fortran/18566] New: Can vary constants
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Should the value of pi change...
The following is very probably illegal code.
Still, it would be nice if this could segfault
instead of silently doing the Wrong Thing.
$ cat variation-constants.f90
module a1
contains
subroutine foo(b)
real :: b
b = 42.
end subroutine foo
end module a1
program main
use a1
real, parameter :: pi = 3.1415926535
call foo(pi)
print *,'pi equals ', pi
end program main
$ gfortran variation-constants.f90 && ./a.out
pi equals 42.00000
$ gfortran -v
Reading specs from /home/zfkts/lib/gcc/ia64-unknown-linux-gnu/4.0.0/specs
Configured with: ../gcc-4.0-20041107/configure --prefix=/home/zfkts
--enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20041107 (experimental)
--
Summary: Can vary constants
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Thomas dot Koenig at online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18566