public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51791] New: [OOP] Failure to resolve typebound function call with base object in parentheses.
@ 2012-01-08 9:00 pault at gcc dot gnu.org
2012-01-09 15:29 ` [Bug fortran/51791] " burnus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-08 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51791
Bug #: 51791
Summary: [OOP] Failure to resolve typebound function call with
base object in parentheses.
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pault@gcc.gnu.org
The submitted testcase for PR46328 is not fixed, even though the other issues
of complex expressions were:
module field_module
implicit none
type ,abstract :: field
contains
procedure(field_op_real) ,deferred :: multiply_real
generic :: operator(*) => multiply_real
end type
abstract interface
function field_op_real(lhs,rhs)
import :: field
class(field) ,intent(in) :: lhs
real ,intent(in) :: rhs
class(field) ,allocatable :: field_op_real
end function
end interface
end module
program main
use field_module
implicit none
class(field) ,pointer :: u
u = (u)*2.
end program
The problem is the parentheses.
The attached fixes the problem, when the procedure is not deferred. However,
it causes such a variety of regressions that I do not have time to investigate.
Cheers
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/51791] [OOP] Failure to resolve typebound function call with base object in parentheses.
2012-01-08 9:00 [Bug fortran/51791] New: [OOP] Failure to resolve typebound function call with base object in parentheses pault at gcc dot gnu.org
@ 2012-01-09 15:29 ` burnus at gcc dot gnu.org
2012-01-09 20:27 ` pault at gcc dot gnu.org
2012-01-09 20:28 ` pault at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-09 15:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51791
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-09 15:28:31 UTC ---
Approved patch:
http://gcc.gnu.org/ml/fortran/2012-01/msg00054.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/51791] [OOP] Failure to resolve typebound function call with base object in parentheses.
2012-01-08 9:00 [Bug fortran/51791] New: [OOP] Failure to resolve typebound function call with base object in parentheses pault at gcc dot gnu.org
2012-01-09 15:29 ` [Bug fortran/51791] " burnus at gcc dot gnu.org
@ 2012-01-09 20:27 ` pault at gcc dot gnu.org
2012-01-09 20:28 ` pault at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-09 20:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51791
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-09 20:26:05 UTC ---
Author: pault
Date: Mon Jan 9 20:25:55 2012
New Revision: 183032
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183032
Log:
2012-01-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/51791
* interface.c (matching_typebound_op): Drill down through
possible parentheses to obtain base expression. Do not test for
'class_ok' but, instead for the class structure components.
* resolve.c (resolve_ordinary_assign): Extend error message for
polymorphic assignment to advise checking for specific
subroutine.
PR fortran/51792
* resolve.c (resolve_typebound_function): Restore 'static' to
declaration.
2012-01-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/51791
* gfortran.dg/typebound_operator_7.f03: Insert parentheses
around base object in first assignment in main program.
* gfortran.dg/typebound_operator_10.f03: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/typebound_operator_10.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/typebound_operator_7.f03
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/51791] [OOP] Failure to resolve typebound function call with base object in parentheses.
2012-01-08 9:00 [Bug fortran/51791] New: [OOP] Failure to resolve typebound function call with base object in parentheses pault at gcc dot gnu.org
2012-01-09 15:29 ` [Bug fortran/51791] " burnus at gcc dot gnu.org
2012-01-09 20:27 ` pault at gcc dot gnu.org
@ 2012-01-09 20:28 ` pault at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-09 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51791
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-09 20:27:50 UTC ---
Fixed on trunk
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-09 20:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-08 9:00 [Bug fortran/51791] New: [OOP] Failure to resolve typebound function call with base object in parentheses pault at gcc dot gnu.org
2012-01-09 15:29 ` [Bug fortran/51791] " burnus at gcc dot gnu.org
2012-01-09 20:27 ` pault at gcc dot gnu.org
2012-01-09 20:28 ` pault 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).