http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56261
--- Comment #9 from janus at gcc dot gnu.org 2013-02-09 16:58:54 UTC --- (In reply to comment #8) > On the test case in comment 2, comment 1? > 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. Thanks for checking. Probably ifort does not support pointer initialization yet (which is a F08 feature). > 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 Again, pointer initialization. > 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. Good, that's compatible with gfortran's behavior (which is fine, since the test case is invalid). Apparently ifort also lacks diagnostics for this.