This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unclassifiable statement error with procedure pointer using template named "structure_"


Good find - this is my fault! I'll be sending a patch shortly.
---
Fritz Reese


On Tue, Sep 13, 2016 at 3:23 PM, Andrew Benson
<abenson@carnegiescience.edu> wrote:
> 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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]