Pointer initialization error under gfortran 4.6

Andrew Benson abenson@its.caltech.edu
Mon Aug 30 19:51:00 GMT 2010


I'm getting an error while compiling a code under the latest gfortran 4.6 
(checked out from svn this morning), which compiled successfully under 
gfortran 4.6 as checked out from svn on Friday.

In particular, when compiling one file I get:

<During initialization>

Error: Pointer initialization target at (1) must have the SAVE attribute
f951: internal compiler error: in gfc_enforce_clean_symbol_state, at 
fortran/symbol.c:3452
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I've reduced this to a minimal case which reproduces the error (although not 
the ICE). The code is attached:

$ gfortran -c objects.merger_trees.F90 -o objects.merger_trees.o                                                                            
<During initialization>

Error: Pointer initialization target at (1) must have the SAVE attribute

Removing the line:

procedure :: getNode => Tree_Node_Get

results in a successful compile, so this seems to be related to the type-bound 
procedure.

Thanks for any help you can offer.

-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 20100830 (experimental) (GCC)



-- 

* Andrew Benson: http://www.tapir.caltech.edu/~abenson/contact.html

* Galacticus: http://sites.google.com/site/galacticusmodel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objects.merger_trees.F90
Type: text/x-fortran
Size: 456 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100830/39c70a42/attachment.bin>


More information about the Fortran mailing list