http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56261



--- Comment #8 from Andrew Benson <abensonca at gmail dot com> 2013-02-09 
16:50:54 UTC ---

On the test case in comment 2, ifort v11.1 reports:



> ifort -o bug.exe bug.F90 

bug.F90(23): error #6592: This symbol must be a defined parameter, an

enumerator, or an argument of an inquiry function that evaluates to a

compile-time constant.   [FF]

  procedure(  ), pointer                   :: f => ff

---------------------------------------------------^

bug.F90(23): error #6973: This is not a valid initialization expression.   [FF]

  procedure(  ), pointer                   :: f => ff

---------------------------------------------------^

compilation aborted for bug.F90 (code 1)



Same for the scalar case.



Interestingly, the workaround doesn't work under ifort - it seems not to like:



  procedure(ff), pointer :: f => ff



but instead needs:



  procedure(ff), pointer :: f

  f => ff



In fact, if I use:



  procedure(), pointer :: f

  f => ff



then it compiles without any warnings/errors but segfaults at runtime.



With:





  procedure(ff), pointer :: f

  f => ff



it compiles and runs as expected.

Reply via email to