public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
@ 2009-10-29 22:42 anlauf at gmx dot de
2009-10-29 22:43 ` [Bug fortran/41873] " anlauf at gmx dot de
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: anlauf at gmx dot de @ 2009-10-29 22:42 UTC (permalink / raw)
To: gcc-bugs
Hi,
the attached code compiles with ifort 11.1 and with nagfor 5.2,
but is rejected with current gfortran:
gfcbug93.f90:47.12:
print *, ipmin% dot_g_g (g,g)
1
Error: ABSTRACT INTERFACE 'dot' must not be referenced at (1)
gfcbug93.f90:47.12:
print *, ipmin% dot_g_g (g,g)
1
Error: ABSTRACT INTERFACE 'dot' must not be referenced at (1)
Cheers,
-ha
--
Summary: [OOP] Bogus Error: ABSTRACT INTERFACE must not be
referenced...
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
@ 2009-10-29 22:43 ` anlauf at gmx dot de
2009-10-30 15:32 ` burnus at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gmx dot de @ 2009-10-29 22:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from anlauf at gmx dot de 2009-10-29 22:42 -------
Created an attachment (id=18931)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18931&action=view)
Test code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
2009-10-29 22:43 ` [Bug fortran/41873] " anlauf at gmx dot de
@ 2009-10-30 15:32 ` burnus at gcc dot gnu dot org
2009-11-04 16:44 ` janus at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-10-30 15:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2009-10-30 15:32 -------
I agree that the following error is bogus:
> print *, ipmin% dot_g_g (g,g)
> 1
> Error: ABSTRACT INTERFACE 'dot' must not be referenced at (1)
While one might not access (type)%dot_g_g as "dot_g_g" is deferred, using
(class)%dot_g_g is valid. (And using (type)%dot_g_g is not possible as one
cannot use "type(abstract_t)"; thus it might be enough to relax the check.)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2009-10-30 15:32:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
2009-10-29 22:43 ` [Bug fortran/41873] " anlauf at gmx dot de
2009-10-30 15:32 ` burnus at gcc dot gnu dot org
@ 2009-11-04 16:44 ` janus at gcc dot gnu dot org
2009-11-04 20:13 ` janus at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-04 16:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janus at gcc dot gnu dot org 2009-11-04 16:43 -------
(In reply to comment #0)
> Error: ABSTRACT INTERFACE 'dot' must not be referenced at (1)
The same error appears in PR 41556.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
` (2 preceding siblings ...)
2009-11-04 16:44 ` janus at gcc dot gnu dot org
@ 2009-11-04 20:13 ` janus at gcc dot gnu dot org
2009-11-04 20:39 ` janus at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-04 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janus at gcc dot gnu dot org 2009-11-04 20:13 -------
Reduced test case:
implicit none
type, abstract :: inner_product_class
contains
procedure(dot), public, nopass, deferred :: dot_g_g
end type
abstract interface
real function dot ()
end function
end interface
contains
subroutine cg (ipmin)
class(inner_product_class) :: ipmin
print *, ipmin%dot_g_g ()
end subroutine
end
Triggers the same error message as comment #0, which, in addition to being
bogus, appears twice.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
` (3 preceding siblings ...)
2009-11-04 20:13 ` janus at gcc dot gnu dot org
@ 2009-11-04 20:39 ` janus at gcc dot gnu dot org
2009-11-05 10:43 ` janus at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-04 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janus at gcc dot gnu dot org 2009-11-04 20:39 -------
(In reply to comment #2)
> While one might not access (type)%dot_g_g as "dot_g_g" is deferred, using
> (class)%dot_g_g is valid. (And using (type)%dot_g_g is not possible as one
> cannot use "type(abstract_t)"; thus it might be enough to relax the check.)
It might be okay for type-bound procedures. However, this check should also
catch the usage of simple abstract procedures, i.e. when adding the following
to the test case in comment #4:
print *, dot()
This is illegal of course, and is not caught without the check in
resolve_function.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
` (4 preceding siblings ...)
2009-11-04 20:39 ` janus at gcc dot gnu dot org
@ 2009-11-05 10:43 ` janus at gcc dot gnu dot org
2009-11-05 10:45 ` janus at gcc dot gnu dot org
2009-11-05 10:45 ` janus at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-05 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from janus at gcc dot gnu dot org 2009-11-05 10:43 -------
Subject: Bug 41873
Author: janus
Date: Thu Nov 5 10:42:48 2009
New Revision: 153934
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153934
Log:
2009-11-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/41556
PR fortran/41873
* resolve.c (resolve_function,resolve_call): Prevent abstract
interfaces
from being called, but allow deferred type-bound procedures with
abstract interface.
2009-11-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/41556
PR fortran/41873
* gfortran.dg/interface_abstract_4.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/interface_abstract_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
` (5 preceding siblings ...)
2009-11-05 10:43 ` janus at gcc dot gnu dot org
@ 2009-11-05 10:45 ` janus at gcc dot gnu dot org
2009-11-05 10:45 ` janus at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-05 10:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from janus at gcc dot gnu dot org 2009-11-05 10:45 -------
Fixed with r153934. Closing.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/41873] [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced...
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
` (6 preceding siblings ...)
2009-11-05 10:45 ` janus at gcc dot gnu dot org
@ 2009-11-05 10:45 ` janus at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-11-05 10:45 UTC (permalink / raw)
To: gcc-bugs
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-10-30 15:32:20 |2009-11-05 10:44:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41873
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-11-05 10:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-29 22:42 [Bug fortran/41873] New: [OOP] Bogus Error: ABSTRACT INTERFACE must not be referenced anlauf at gmx dot de
2009-10-29 22:43 ` [Bug fortran/41873] " anlauf at gmx dot de
2009-10-30 15:32 ` burnus at gcc dot gnu dot org
2009-11-04 16:44 ` janus at gcc dot gnu dot org
2009-11-04 20:13 ` janus at gcc dot gnu dot org
2009-11-04 20:39 ` janus at gcc dot gnu dot org
2009-11-05 10:43 ` janus at gcc dot gnu dot org
2009-11-05 10:45 ` janus at gcc dot gnu dot org
2009-11-05 10:45 ` janus 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).