public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46849] New: [OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE
@ 2010-12-08 13:07 burnus at gcc dot gnu.org
  2010-12-08 13:08 ` [Bug fortran/46849] " burnus at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-08 13:07 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: janus@gcc.gnu.org, domob@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!


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-14 10:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 13:07 [Bug fortran/46849] New: [OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE burnus at gcc dot gnu.org
2010-12-08 13:08 ` [Bug fortran/46849] " burnus at gcc dot gnu.org
2010-12-08 13:30 ` burnus at gcc dot gnu.org
2010-12-08 13:48 ` janus at gcc dot gnu.org
2010-12-13 21:59 ` janus at gcc dot gnu.org
2010-12-14  8:36 ` burnus at gcc dot gnu.org
2010-12-14 12:13 ` janus at gcc dot gnu.org
2010-12-14 18:31 ` janus at gcc dot gnu.org
2010-12-17 12:32 ` janus at gcc dot gnu.org
2010-12-17 12:34 ` janus at gcc dot gnu.org
2011-02-14 10:30 ` janus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).