This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Symbol name too long for class variable
- From: Andrew Benson <abenson at its dot caltech dot edu>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 15 Dec 2010 12:24:24 -0800
- Subject: Symbol name too long for class variable
This is probably not a bug, but I wanted to double-check before I modify my
code. The attached module compiled with gfortran 4.6 works OK if the input
variable to my function is a "type", but breaks with a "Symbol name too long"
error if it's a "class". Specifically when compiling using the "class" form:
$ gfortran -c test.F90 -o test.o -DGCC46
test.F90:13.64:
class(molecularAbundancesStructure), intent(in) :: molecules
1
Internal Error at (1):
new_symbol(): Symbol name too long
and when compiling with the type() form:
$ gfortran -c test.F90 -o test.o
(i.e. successful compilation).
I assume that class variables simply generate longer symbol names and that my
(admittedly rather long) derived type name pushes this over the limit? If so,
I'll simply change it, but wanted to be sure that this was expected behavior
first.
Thanks,
Andrew.
--
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/i686-pc-linux-
gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.6/configure --prefix=/usr/local/gcc-trunk --enable-
languages=c,c++,fortran --disable-multilib --with-gmp=/usr/local --with-
mpc=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.6.0 20101214 (experimental) (GCC)
--
* Andrew Benson: http://www.tapir.caltech.edu/~abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel
module Molecular_Abundances_Structure
public
type molecularAbundancesStructure
double precision, allocatable, dimension(:) :: molecularValue
end type molecularAbundancesStructure
contains
double precision function Molecules_Abundances(molecules)
implicit none
#ifdef GCC46
class(molecularAbundancesStructure), intent(in) :: molecules
#else
type(molecularAbundancesStructure), intent(in) :: molecules
#endif
return
end function Molecules_Abundances
end module Molecular_Abundances_Structure