This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24336] New: fortran variable name exceeds the maximum limit per standard
- From: "uttamp at us dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2005 18:59:03 -0000
- Subject: [Bug fortran/24336] New: fortran variable name exceeds the maximum limit per standard
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
As per the standard for fortran 95, the maximum length of a variable is 31
characters. But gfortran doesn't truncate, complain or warn (is it platform
dependent?) when that is not true like in following case,
$ cat test.f90
program test_name
integer abcdefghijklmnopqrstuvwxyz123456
abcdefghijklmnopqrstuvwxyz123456 = 10
print *, abcdefghijklmnopqrstuvwxyz123456
print *, abcdefghijklmnopqrstuvwxyz12345
end program
$ gfortran test.f90
$ ./a.out
10
2.5261893E-29
$ gfortran -v
Using built-in specs.
Target: powerpc64-linux
Configured with: /home/gccbuild/gcc_mline_anoncvs/gcc/configure
--prefix=/opt/gcc-nightly/mline-20051011 --build=powerpc64-linux
--host=powerpc64-linux --target=powerpc64-linux --with-cpu=default32
--with-as=/opt/gcc-nightly/mline-20051011/bin/as
--with-ld=/opt/gcc-nightly/mline-20051011/bin/ld --enable-threads=posix
--enable-shared --enable-__cxa_atexit
--enable-languages=c,c++,f95,java,objc,obj-c++ --enable-checking
--with-mpfr=/opt/gcc-nightly/mline-20051011
Thread model: posix
gcc version 4.1.0 20051010 (experimental)
--
Summary: fortran variable name exceeds the maximum limit per
standard
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uttamp at us dot ibm dot com
GCC build triplet: powerpc64_linux
GCC host triplet: powerpc64_linux
GCC target triplet: powerpc64_linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24336