* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
@ 2013-06-05 12:50 ` burnus at gcc dot gnu.org
2013-06-05 14:31 ` burnus at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-05 12:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Patch: http://gcc.gnu.org/ml/fortran/2013-06/msg00045.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
2013-06-05 12:50 ` [Bug fortran/57530] " burnus at gcc dot gnu.org
@ 2013-06-05 14:31 ` burnus at gcc dot gnu.org
2013-06-05 17:59 ` burnus at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-05 14:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> Patch: http://gcc.gnu.org/ml/fortran/2013-06/msg00045.html
Sigh, the patch isn't sufficient as the trans*.c code associate the TYPE with
the CLASS container - not its content. Test case below.
! { dg-do run }
!
! PR fortran/57530
!
module m
implicit none
type t
integer :: ii = 55
end type t
contains
subroutine sub (tgt, tgt2)
class(t), target :: tgt, tgt2(:)
type(t), pointer :: ptr, ptr2(:)
if (tgt%ii /= 43) call abort()
if (size (tgt2) /= 3) call abort()
if (any (tgt2(:)%ii /= [11,22,33])) call abort()
ptr => tgt ! TYPE => CLASS
ptr2 => tgt2 ! TYPE => CLASS
if (.not. associated(ptr)) call abort()
if (.not. associated(ptr2)) call abort()
if (.not. associated(ptr,tgt)) call abort()
if (.not. associated(ptr2,tgt2)) call abort()
if (ptr%ii /= 43) call abort()
if (size (ptr2) /= 3) call abort()
if (any (ptr2(:)%ii /= [11,22,33])) call abort()
end subroutine sub
end module m
use m
type(t), target :: x
type(t), target :: y(3)
x%ii = 43
y(:)%ii = [11,22,33]
call sub(x,y)
end
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
2013-06-05 12:50 ` [Bug fortran/57530] " burnus at gcc dot gnu.org
2013-06-05 14:31 ` burnus at gcc dot gnu.org
@ 2013-06-05 17:59 ` burnus at gcc dot gnu.org
2013-06-06 15:06 ` burnus at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-05 17:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 30262
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30262&action=edit
Draft patch - does not fully work, yet
Currently fails for
x = func1()
in assign_11.f90
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2013-06-05 17:59 ` burnus at gcc dot gnu.org
@ 2013-06-06 15:06 ` burnus at gcc dot gnu.org
2013-07-25 22:15 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-06 15:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #3)
The resolve patch has been approved (but not yet committed):
http://gcc.gnu.org/ml/fortran/2013-06/msg00049.html
The trans*.c patch has still to be fixed and submitted. (Cf. comment 3)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
` (3 preceding siblings ...)
2013-06-06 15:06 ` burnus at gcc dot gnu.org
@ 2013-07-25 22:15 ` burnus at gcc dot gnu.org
2013-07-30 7:21 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-25 22:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Resolution patch (approved but not yet committed):
http://gcc.gnu.org/ml/fortran/2013-06/msg00049.html
trans*.c patch for TYPE => CLASS (submitted):
http://gcc.gnu.org/ml/fortran/2013-07/msg00086.html
Outstanding/TODO: trans*c patch for TYPE = CLASS, where CLASS is a scalar or
array variable, function or array constructor.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
` (4 preceding siblings ...)
2013-07-25 22:15 ` burnus at gcc dot gnu.org
@ 2013-07-30 7:21 ` burnus at gcc dot gnu.org
2013-07-30 7:24 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-30 7:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Tue Jul 30 07:20:43 2013
New Revision: 201329
URL: http://gcc.gnu.org/viewcvs?rev=201329&root=gcc&view=rev
Log:
2013-07-30 Tobias Burnus <burnus@net-b.de>
PR fortran/57530
* symbol.c (gfc_type_compatible): A type is type compatible with
a class if both have the same declared type.
* interface.c (compare_type): Reject CLASS/TYPE even if they
are type compatible.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/symbol.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
` (5 preceding siblings ...)
2013-07-30 7:21 ` burnus at gcc dot gnu.org
@ 2013-07-30 7:24 ` burnus at gcc dot gnu.org
2014-09-06 11:04 ` dominiq at lps dot ens.fr
2015-10-10 9:05 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-30 7:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The original test case (cf. comment 0) is now solved.
However, only "type => class" is handled. Still missing is "type = class",
where CLASS is a (coarray) scalar or (coarray) array variable, function or an
array constructor. See also comment 3.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
` (6 preceding siblings ...)
2013-07-30 7:24 ` burnus at gcc dot gnu.org
@ 2014-09-06 11:04 ` dominiq at lps dot ens.fr
2015-10-10 9:05 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-09-06 11:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2014-09-06
Ever confirmed|0 |1
--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The codes in comments 0 and 2 compile with gfortran 4.9.1 and trunk (5.0).
Should not this PR resolved as FIXED and a new PR open for the remaining issue
in comment 8?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/57530] [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type)
2013-06-04 19:06 [Bug fortran/57530] New: [OOP] Wrongly rejects type_pointer => class_target (which have identical declared type) burnus at gcc dot gnu.org
` (7 preceding siblings ...)
2014-09-06 11:04 ` dominiq at lps dot ens.fr
@ 2015-10-10 9:05 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-10 9:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57530
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> The codes in comments 0 and 2 compile with gfortran 4.9.1 and trunk (5.0).
> Should not this PR resolved as FIXED and a new PR open for the remaining
> issue in comment 8?
No feedback for over a year. Closing as FIXED. Please open new PR(s) with a
test case if there are remaining issue(s).
^ permalink raw reply [flat|nested] 10+ messages in thread