Error: Can't convert TYPE(c_ptr) to INTEGER(4)
Andrew Benson
abenson@its.caltech.edu
Thu Sep 2 18:32:00 GMT 2010
After checking out the latest gfortran 4.6 updates (revision 163780) this
morning I'm getting an error that seems to be related to "c_null_ptr". I've
attached a minimal test case that shows this error.
$ gfortran -c test.F90 -o test.o
test.F90:5.30:
type(c_ptr) :: accelPtr = c_null_ptr
1
Error: Can't convert TYPE(c_ptr) to INTEGER(4) at (1)
The test case compiles OK under gfortran 4.4. The problem must have arisen
between revisions 163661 and 163780 (my code compiled and ran successfully
under 163661). Note that the presence of the "allocate" statement in the test
case is required to cause the error - commenting it out results in a
successful compile.
I'll try to locate the responsible revision unless anyone can figure out what
the problem is first!
-Andrew.
--
* 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: test.F90
Type: text/x-fortran
Size: 373 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100902/ba83f153/attachment.bin>
More information about the Fortran
mailing list