public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs
@ 2012-07-31 19:15 janus at gcc dot gnu.org
2012-07-31 20:36 ` [Bug fortran/54147] " janus at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-07-31 19:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54147
Bug #: 54147
Summary: [F03] Interface checks for PPCs & TBPs
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: janus@gcc.gnu.org
After fixing PR 42418, I realized that the constraints in F08:C1216 apply also
to
1) procedure-pointer components and
2) type-bound procedures,
where they are currently not enforced.
Test case for PPCs:
interface gen
procedure gen
end interface
type t1
procedure(gen),pointer,nopass :: p1
procedure(gen2),pointer,nopass :: p2 ! { dg-error "may not be generic" }
end type
type t2
procedure(sf),pointer,nopass :: p3 ! { dg-error "may not be a statement
function" }
end type
type t3
procedure(char),pointer,nopass :: p4 ! { dg-error "Intrinsic procedure" }
end type
interface gen2
procedure gen
end interface
sf(x) = x**2
contains
subroutine gen
end subroutine
end
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54147] [F03] Interface checks for PPCs & TBPs
2012-07-31 19:15 [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs janus at gcc dot gnu.org
@ 2012-07-31 20:36 ` janus at gcc dot gnu.org
2012-07-31 20:43 ` janus at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-07-31 20:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54147
--- Comment #1 from janus at gcc dot gnu.org 2012-07-31 20:36:41 UTC ---
Equivalent test case for TBPs:
interface gen
procedure gen
end interface
type, abstract :: t1
contains
procedure(gen),deferred,nopass :: p1
procedure(gen2),deferred,nopass :: p2
end type
type, abstract :: t2
contains
procedure(sf),deferred,nopass :: p3
end type
type, abstract :: t3
contains
procedure(char),deferred,nopass :: p4
end type
interface gen2
procedure gen
end interface
sf(x) = x**2
contains
subroutine gen
end subroutine
end
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54147] [F03] Interface checks for PPCs & TBPs
2012-07-31 19:15 [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs janus at gcc dot gnu.org
2012-07-31 20:36 ` [Bug fortran/54147] " janus at gcc dot gnu.org
@ 2012-07-31 20:43 ` janus at gcc dot gnu.org
2012-08-01 9:34 ` [Bug fortran/54147] [F03] Interface checks for PPCs & deferred TBPs janus at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-07-31 20:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54147
--- Comment #2 from janus at gcc dot gnu.org 2012-07-31 20:43:16 UTC ---
For TBPs there seems to be a similar but non-equivalent check in
resolve_typebound_procedure. It is supposed to check for F08:C465, but
apparently is also applied to the interface of deferred procedures (which it
should not be), and therefore probably rejects too much (all four cases in
comment 1 are rejected).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54147] [F03] Interface checks for PPCs & deferred TBPs
2012-07-31 19:15 [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs janus at gcc dot gnu.org
2012-07-31 20:36 ` [Bug fortran/54147] " janus at gcc dot gnu.org
2012-07-31 20:43 ` janus at gcc dot gnu.org
@ 2012-08-01 9:34 ` janus at gcc dot gnu.org
2012-08-02 8:58 ` janus at gcc dot gnu.org
2012-08-02 9:01 ` janus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-08-01 9:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54147
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-08-01
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Summary|[F03] Interface checks for |[F03] Interface checks for
|PPCs & TBPs |PPCs & deferred TBPs
Ever Confirmed|0 |1
--- Comment #3 from janus at gcc dot gnu.org 2012-08-01 09:34:15 UTC ---
(In reply to comment #0)
> After fixing PR 42418, I realized that the constraints in F08:C1216 apply also
> to
> 1) procedure-pointer components and
> 2) type-bound procedures,
to be precise, they only apply to *deferred* TBPs, since 'regular' ones do not
have an interface specification.
I'm working on a patch ...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54147] [F03] Interface checks for PPCs & deferred TBPs
2012-07-31 19:15 [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs janus at gcc dot gnu.org
` (2 preceding siblings ...)
2012-08-01 9:34 ` [Bug fortran/54147] [F03] Interface checks for PPCs & deferred TBPs janus at gcc dot gnu.org
@ 2012-08-02 8:58 ` janus at gcc dot gnu.org
2012-08-02 9:01 ` janus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-08-02 8:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54147
--- Comment #4 from janus at gcc dot gnu.org 2012-08-02 08:58:01 UTC ---
Author: janus
Date: Thu Aug 2 08:57:58 2012
New Revision: 190069
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190069
Log:
2012-08-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/54147
* resolve.c (check_proc_interface): New routine for PROCEDURE interface
checks.
(resolve_procedure_interface,resolve_typebound_procedure,
resolve_fl_derived0): Call it.
2012-08-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/54147
* gfortran.dg/abstract_type_6.f03: Modified.
* gfortran.dg/proc_ptr_comp_3.f90: Modified.
* gfortran.dg/proc_ptr_comp_35.f90: New.
* gfortran.dg/typebound_proc_9.f03: Modified.
* gfortran.dg/typebound_proc_26.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_35.f90
trunk/gcc/testsuite/gfortran.dg/typebound_proc_26.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/abstract_type_6.f03
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f90
trunk/gcc/testsuite/gfortran.dg/typebound_proc_9.f03
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/54147] [F03] Interface checks for PPCs & deferred TBPs
2012-07-31 19:15 [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs janus at gcc dot gnu.org
` (3 preceding siblings ...)
2012-08-02 8:58 ` janus at gcc dot gnu.org
@ 2012-08-02 9:01 ` janus at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: janus at gcc dot gnu.org @ 2012-08-02 9:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54147
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from janus at gcc dot gnu.org 2012-08-02 09:00:51 UTC ---
Fixed with r190069. Closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-02 9:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-31 19:15 [Bug fortran/54147] New: [F03] Interface checks for PPCs & TBPs janus at gcc dot gnu.org
2012-07-31 20:36 ` [Bug fortran/54147] " janus at gcc dot gnu.org
2012-07-31 20:43 ` janus at gcc dot gnu.org
2012-08-01 9:34 ` [Bug fortran/54147] [F03] Interface checks for PPCs & deferred TBPs janus at gcc dot gnu.org
2012-08-02 8:58 ` janus at gcc dot gnu.org
2012-08-02 9:01 ` 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).