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

           Summary: [OOP] MODULE PROCEDURE resolution does not work in
                    BLOCK or SELECT TYPE
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org
                CC: ja...@gcc.gnu.org, do...@gcc.gnu.org


The following problem has been reported by Reinhold Bader.

    select type (p => fun%options)
    type is (qdr_opt_qag)
       p%f = fgsl_function_init(fun_qag)
    end select

Is rejected with a current GCC 4.6 with:

pmr.f90:35.39:
       p%f = fgsl_function_init(fun_qag)
                                       1
Error: Symbol 'fun_qag' at (1) has no IMPLICIT type
f951: internal compiler error: in gfc_enforce_clean_symbol_state, at
fortran/symbol.c:3472


Here, "fun_qag" is a module procedure. It works if one flips the order of
"fun_qag" and the calling procedure. It also works if one uses the line:

       fun%options%f = fgsl_function_init(fun_qag)

as long as the line is neither in a BLOCK nor in a SELECT TYPE. Seemingly,
resolve_symbol does not search in the module name space!

Reply via email to