https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119889

--- Comment #8 from Jürgen Reuter <juergen.reuter at desy dot de> ---

> 
> Hi Harald,
> as I reported this to NAG and Intel as well, I got the following reply from
> Malcolm Cohen from NAG:
> "I note that there is an error in your example at line 56: it has
> procedure(dlsym), pointer :: tmp_fun
> however, it is not being pointer-assigned dlsym, but the result of
> referencing dlsym. Therefore it should be something like
> procedure(), pointer :: tmp_fun"
> 
> After correcting this, both Nagfor and Ifx compile, as in gfortran. 
> Cheers,
>    Jürgen

One more thing that Malcolm wrote:
"After correcting this mistake, I note that if you give the function result an
explicit interface, the panic will not happen. (It may also a good idea to give
"tmp_fun" the same explicit interface as below, but that is not necessary.)

For example, instead of
  procedure(), pointer :: f_funp

at line 28, the declaration

interface
  subroutine subroutine
  end subroutine
end interface

procedure(subroutine), pointer :: f_funp

will work.
"

Reply via email to