This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Unclassifiable statement error with procedure pointer using template named "structure_"
- From: Andrew Benson <abenson at carnegiescience dot edu>
- To: fortran at gcc dot gnu dot org
- Date: Tue, 13 Sep 2016 12:23:26 -0700
- Subject: Unclassifiable statement error with procedure pointer using template named "structure_"
- Authentication-results: sourceware.org; auth=none
I've opened PR77584
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77584
for the following bug.
In gfortran 7.0.0 (r240119) the following causes an error on compilation:
module bug
abstract interface
double precision function structure_()
end function structure_
end interface
contains
double precision function a()
procedure(structure_), pointer :: b
end function a
end module bug
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-pc-
linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/
Tools --enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 7.0.0 20160913 (experimental) (GCC)
$ gfortran -c tmp.F90 -o tmp.o
tmp.F90:8:4:
procedure(structure_), pointer :: b
1
Error: Unclassifiable statement at (1)
The problem seems to occur only if the interface name begins with "structure",
so my guess is that this part of the name if being interpreted as a STRUCTURE
statement.
--
* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel