public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
@ 2014-06-05 14:55 robert.rosenberg at nrl dot navy.mil
  2014-06-05 15:20 ` [Bug fortran/61420] [4.7/4.8/4.9/4.10 Regression] " dominiq at lps dot ens.fr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: robert.rosenberg at nrl dot navy.mil @ 2014-06-05 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61420
           Summary: type bound procedure with pass attribute, that returns
                    a procedure pointer, fails to compile
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: robert.rosenberg at nrl dot navy.mil

Created attachment 32894
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32894&action=edit
defines type bound procedure that returns a procedure pointer

I was writing some sample code that defines a function that returns a pointer
procedure. 

When I compile the code with Intel Ifort.14.x/15.x it complains saying that
this exact feature is not supported.

When I compile with GNU gfortran49, it compiles and runs fine. But when I
insert the statement, 'implicit none' at the beginning of the code, the code
fails to compile. If I then use an implicit procedure pointer interface, it
again runs fine. 

I include the code as an attachment


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

* [Bug fortran/61420] [4.7/4.8/4.9/4.10 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
@ 2014-06-05 15:20 ` dominiq at lps dot ens.fr
  2014-06-25 11:16 ` [Bug fortran/61420] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-06-05 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-06-05
            Summary|type bound procedure with   |[4.7/4.8/4.9/4.10
                   |pass attribute, that        |Regression] type bound
                   |returns a procedure         |procedure with pass
                   |pointer, fails to compile   |attribute, that returns a
                   |                            |procedure pointer, fails to
                   |                            |compile
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
No error with r162456 (2010-07-23), error with r1635293 (2010-08-24). No
obvious culprit. Still present at r211262.


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

* [Bug fortran/61420] [4.8/4.9/4.10 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
  2014-06-05 15:20 ` [Bug fortran/61420] [4.7/4.8/4.9/4.10 Regression] " dominiq at lps dot ens.fr
@ 2014-06-25 11:16 ` rguenth at gcc dot gnu.org
  2014-06-26 12:45 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-25 11:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.4


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

* [Bug fortran/61420] [4.8/4.9/4.10 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
  2014-06-05 15:20 ` [Bug fortran/61420] [4.7/4.8/4.9/4.10 Regression] " dominiq at lps dot ens.fr
  2014-06-25 11:16 ` [Bug fortran/61420] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-06-26 12:45 ` rguenth at gcc dot gnu.org
  2014-11-26 16:19 ` [Bug fortran/61420] [4.8/4.9/5 " janus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-26 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


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

* [Bug fortran/61420] [4.8/4.9/5 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
                   ` (2 preceding siblings ...)
  2014-06-26 12:45 ` rguenth at gcc dot gnu.org
@ 2014-11-26 16:19 ` janus at gcc dot gnu.org
  2014-12-19 13:37 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2014-11-26 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from janus at gcc dot gnu.org ---
There is a piece of code in resolve_variable (resolve.c, line 4911) that looks
like it is related to this problem:

  if (sym->attr.flavor == FL_PROCEDURE
      && (!sym->attr.function
      || (sym->attr.function && sym->result
          && sym->result->attr.proc_pointer
          && !sym->result->attr.function)))
    {
      e->ts.type = BT_PROCEDURE;
      goto resolve_procedure;
    }

The error which is thrown here comes from gfc_set_default_type, which is being
called from resolve_variable.


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

* [Bug fortran/61420] [4.8/4.9/5 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
                   ` (3 preceding siblings ...)
  2014-11-26 16:19 ` [Bug fortran/61420] [4.8/4.9/5 " janus at gcc dot gnu.org
@ 2014-12-19 13:37 ` jakub at gcc dot gnu.org
  2015-06-23  8:22 ` [Bug fortran/61420] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


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

* [Bug fortran/61420] [4.8/4.9/5/6 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
                   ` (4 preceding siblings ...)
  2014-12-19 13:37 ` jakub at gcc dot gnu.org
@ 2015-06-23  8:22 ` rguenth at gcc dot gnu.org
  2015-06-26 20:09 ` [Bug fortran/61420] [4.9/5/6 " jakub at gcc dot gnu.org
  2015-06-26 20:36 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


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

* [Bug fortran/61420] [4.9/5/6 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
                   ` (5 preceding siblings ...)
  2015-06-23  8:22 ` [Bug fortran/61420] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
@ 2015-06-26 20:09 ` jakub at gcc dot gnu.org
  2015-06-26 20:36 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


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

* [Bug fortran/61420] [4.9/5/6 Regression] type bound procedure with pass attribute, that returns a procedure pointer, fails to compile
  2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
                   ` (6 preceding siblings ...)
  2015-06-26 20:09 ` [Bug fortran/61420] [4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-26 20:36 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

end of thread, other threads:[~2015-06-26 20:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05 14:55 [Bug fortran/61420] New: type bound procedure with pass attribute, that returns a procedure pointer, fails to compile robert.rosenberg at nrl dot navy.mil
2014-06-05 15:20 ` [Bug fortran/61420] [4.7/4.8/4.9/4.10 Regression] " dominiq at lps dot ens.fr
2014-06-25 11:16 ` [Bug fortran/61420] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-06-26 12:45 ` rguenth at gcc dot gnu.org
2014-11-26 16:19 ` [Bug fortran/61420] [4.8/4.9/5 " janus at gcc dot gnu.org
2014-12-19 13:37 ` jakub at gcc dot gnu.org
2015-06-23  8:22 ` [Bug fortran/61420] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:09 ` [Bug fortran/61420] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:36 ` jakub 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).