public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40591]  New: Procedure(interface): Rejected if interface is indirectly hostassociated
@ 2009-06-29 17:07 burnus at gcc dot gnu dot org
  2009-07-07  5:01 ` [Bug fortran/40591] " pault at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-06-29 17:07 UTC (permalink / raw)
  To: gcc-bugs

The following program fails with:

    procedure(sub), pointer :: pptr2
                                    1
Error: Interface 'sub' of procedure 'pptr2' at (1) must be explicit


The question is whether it is valid or not. As both NAG f95 and ifort reject it
(g95 accepts it), it might be invalid.


However, if one uncomments pptr1: gfortran, NAG f95 and g95 accept pptr1 and
pptr2 -- while ifort continues to reject pptr2 only. Thus it might be valid at
the end.


program main
!  procedure(sub), pointer :: pptr1
!  nullify (pptr1)
contains
  subroutine test()
    procedure(sub), pointer :: pptr2
    nullify (pptr2)
  end subroutine test
  subroutine sub()
  end subroutine sub
end program main


-- 
           Summary: Procedure(interface): Rejected if interface is
                    indirectly hostassociated
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
@ 2009-07-07  5:01 ` pault at gcc dot gnu dot org
  2009-07-08  4:38 ` pault at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-07-07  5:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2009-07-07 05:01 -------
(In reply to comment #0)
> The following program fails with:
> 
>     procedure(sub), pointer :: pptr2
>                                     1
> Error: Interface 'sub' of procedure 'pptr2' at (1) must be explicit
> 
> 
> The question is whether it is valid or not. As both NAG f95 and ifort reject it
> (g95 accepts it), it might be invalid.

Although I can find nowhere in the standards that says that it is valid, I
believe that by the normal rules of host association of procedures, it must be.

gfortran accepts it if 'test' and 'sub' are interchanged.

I have put it on my todo list.

Cheers

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-07 05:01:00
               date|                            |


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
  2009-07-07  5:01 ` [Bug fortran/40591] " pault at gcc dot gnu dot org
@ 2009-07-08  4:38 ` pault at gcc dot gnu dot org
  2009-07-08  9:48 ` pault at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-07-08  4:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2009-07-08 04:38 -------
Subject: Bug 40591

Author: pault
Date: Wed Jul  8 04:38:06 2009
New Revision: 149362

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149362
Log:
2008-07-08  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/40591
        * decl.c (match_procedure_interface):  Correct the association
        or creation of the interface procedure's symbol.

2008-07-08  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/40591
        * gfortran.dg/proc_ptr_21.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_21.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
  2009-07-07  5:01 ` [Bug fortran/40591] " pault at gcc dot gnu dot org
  2009-07-08  4:38 ` pault at gcc dot gnu dot org
@ 2009-07-08  9:48 ` pault at gcc dot gnu dot org
  2009-07-08 11:47 ` dominiq at lps dot ens dot fr
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-07-08  9:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2009-07-08 09:48 -------
Well..... I suppose that I should accept the bug :-)

I will commit the fix to 4.4 over the weekend, so please try to test it to
destruction on 4.5.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-07-07 05:01:00         |2009-07-08 09:48:15
               date|                            |


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-07-08  9:48 ` pault at gcc dot gnu dot org
@ 2009-07-08 11:47 ` dominiq at lps dot ens dot fr
  2009-07-08 12:37 ` burnus at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-07-08 11:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dominiq at lps dot ens dot fr  2009-07-08 11:47 -------
It seems that gfortran.dg/proc_ptr_21.f90 is failing on i686-pc-linux-gnu and
Intel64(?), see

http://gcc.gnu.org/ml/gcc-testresults/2009-07/msg00755.html
http://gcc.gnu.org/ml/gcc-regression/2009-07/msg00078.html


-- 

dominiq at lps dot ens dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu dot org


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-07-08 11:47 ` dominiq at lps dot ens dot fr
@ 2009-07-08 12:37 ` burnus at gcc dot gnu dot org
  2009-07-08 13:28 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-08 12:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from burnus at gcc dot gnu dot org  2009-07-08 12:37 -------
(In reply to comment #4)
> It seems that gfortran.dg/proc_ptr_21.f90 is failing on i686-pc-linux-gnu and
> Intel64(?), see

I can - somewhat - reproduce it. It does not fail but valgrind shows
(x86-64-linux and i686-linux):

==32231== Conditional jump or move depends on uninitialised value(s)
==32231==    at 0x80485A2: test.1513 (proc_ptr_21.f90:26)
==32231==    by 0x8048548: MAIN__ (proc_ptr_21.f90:8)
==32231==    by 0x80485F4: main (proc_ptr_21.f90:8)

That is solved by adding:
   i = 0
to subroutine test (while any other number causes the abortion).


-- 


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-07-08 12:37 ` burnus at gcc dot gnu dot org
@ 2009-07-08 13:28 ` pault at gcc dot gnu dot org
  2009-07-08 13:31 ` dominiq at lps dot ens dot fr
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-07-08 13:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2009-07-08 13:28 -------
(In reply to comment #5)

> That is solved by adding:
>    i = 0
> to subroutine test (while any other number causes the abortion).
> 

Indeed - that was in the test originally; I do not know what happened to it.
I'll put it right tonight.

Thanks

Paul


-- 


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-07-08 13:28 ` pault at gcc dot gnu dot org
@ 2009-07-08 13:31 ` dominiq at lps dot ens dot fr
  2009-07-20  9:24 ` janus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-07-08 13:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dominiq at lps dot ens dot fr  2009-07-08 13:31 -------
pr40683 is a duplicate.


-- 


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-07-08 13:31 ` dominiq at lps dot ens dot fr
@ 2009-07-20  9:24 ` janus at gcc dot gnu dot org
  2010-05-07 20:31 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-07-20  9:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from janus at gcc dot gnu dot org  2009-07-20 09:24 -------
I guess everything is fixed now. Can we close this PR?


-- 


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-07-20  9:24 ` janus at gcc dot gnu dot org
@ 2010-05-07 20:31 ` dfranke at gcc dot gnu dot org
  2010-05-08 14:06 ` pault at gcc dot gnu dot org
  2010-07-10 16:46 ` pault at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-07 20:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dfranke at gcc dot gnu dot org  2010-05-07 20:30 -------
(In reply to comment #8)
> I guess everything is fixed now. Can we close this PR?

Ping?


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2010-05-07 20:31 ` dfranke at gcc dot gnu dot org
@ 2010-05-08 14:06 ` pault at gcc dot gnu dot org
  2010-07-10 16:46 ` pault at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-05-08 14:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pault at gcc dot gnu dot org  2010-05-08 14:05 -------
(In reply to comment #9)
> (In reply to comment #8)
> > I guess everything is fixed now. Can we close this PR?
> 
> Ping?
>

Note that I did not apply the patch to 4.4 as I said that I would.  What do you
think?

Cheers

Paul


-- 


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


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

* [Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
  2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2010-05-08 14:06 ` pault at gcc dot gnu dot org
@ 2010-07-10 16:46 ` pault at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-07-10 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pault at gcc dot gnu dot org  2010-07-10 16:46 -------
(In reply to comment #10)

> Note that I did not apply the patch to 4.4 as I said that I would.  What do you
> think?

4.4 is sufficiently different from 4.5/6 that I am closing this as fixed.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2010-07-10 16:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 17:07 [Bug fortran/40591] New: Procedure(interface): Rejected if interface is indirectly hostassociated burnus at gcc dot gnu dot org
2009-07-07  5:01 ` [Bug fortran/40591] " pault at gcc dot gnu dot org
2009-07-08  4:38 ` pault at gcc dot gnu dot org
2009-07-08  9:48 ` pault at gcc dot gnu dot org
2009-07-08 11:47 ` dominiq at lps dot ens dot fr
2009-07-08 12:37 ` burnus at gcc dot gnu dot org
2009-07-08 13:28 ` pault at gcc dot gnu dot org
2009-07-08 13:31 ` dominiq at lps dot ens dot fr
2009-07-20  9:24 ` janus at gcc dot gnu dot org
2010-05-07 20:31 ` dfranke at gcc dot gnu dot org
2010-05-08 14:06 ` pault at gcc dot gnu dot org
2010-07-10 16:46 ` pault at gcc dot gnu dot 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).